On Sat, Sep 13, 2025 at 2:30 PM Jonathan Vanasco <[email protected]> wrote: > I recommend against this approach, as it does not scale well. The issue is > this requires a dedicated Pyramid worker (thread or process). IMHO, it's > best to offload stuff like this onto something like Nginx/Apache/HAProxy that > can handle concurrency and streaming better, while freeing up the worker. A > common approach is to store some metadata about the generated file and stash > it in a database, then have a cronjob (or similar) read that database and > delete expired files after 24 hours.
Good to know, but this is a low-volume site with a restricted userbase. The feature is currently used only a few times a year, and I could see that going to a couple times a week at most. But while it's used infrequently, some of its use cases are essential. It replaces an offline script that will be harder to support in the new IT infrastructure. And I needed to implement it quickly to fold it into a release this month. > > Personally in cases like this I upload the file to S3 and then redirect the > > user to the signed URL. S3 lifecycle can be configured to delete the file > > after a day, which keeps storage costs minimal. I made a prototype of that for another feature, serving attachment files interactively in the site. But one of the sysadmins recommended against this approach, saying using S3 to serve directly to users was prone to delays. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/pylons-discuss/CAH9f%3DuqHirWWUE5gQkUWpiifQFTYJq5EkYod6ifhaRWKtdF%3DvA%40mail.gmail.com.
