silverstripe / silverstripe-s3

Silverstripe module to store assets in S3 rather than on the local filesystem (SS4/SS5 only)
BSD 3-Clause "New" or "Revised" License
20 stars 25 forks source link

Asset Management Timing Out on Heroku / Bucketeer (S3) Resource Integration #68

Closed zaidaldabbagh closed 2 months ago

zaidaldabbagh commented 3 months ago

Hi all, my SS5 Asset management is timing out on Heroku / Bucketeer (S3) Resource Integration.

I'm currently on this SilverStripe 5 version:

"name": "silverstripe/recipe-cms",
"version": "5.1.0"

And on this SilverStripe S3 version:

"name": "silverstripe/s3",
"version": "3.0.0"

Any idea what is causing this outage?

obj63mc commented 3 months ago

With heroku - you have 30 seconds to execute all HTTP requests, if they take longer than that you will get an error. So if you have say a ton of files or a lot of draft files, that could possibly exceed heroku's 30 seconds to load everything. This isn't an issue with the s3 wrapper more just an issue with how heroku limits the time of requests.

zaidaldabbagh commented 3 months ago

Thnx @obj63mc that might be it :) ... I have two options I guess, either break down my logos into subfolders so it doesn't time out, i.e. work with Heroku's constraints, or try and raise a ticket with the Bucketeer team to see if we can extend that timeout, however the latter won't happen, as they probably have the timeout in place across all of their instances.

wilr commented 2 months ago

@zaidaldabbagh I've written a PR which improves caching and reduces the number of S3 calls now (https://github.com/silverstripe/silverstripe-s3/pull/70) that should hopefully speed things up for you.