Also increase the timeout for the external process to complete the transform.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- Restricted Diffusion Commit
rPc4ea1e6e21d1: Increase the maximum size eligible for image transforms configurable from 4MB…
Careful inspection
Diff Detail
- Repository
- rP Phabricator
- Branch
- param
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 9054 Build 10652: arc lint + arc unit
Event Timeline
Why not just increase the base to 8MB? Can you give some insight into the problems your seeing on your install?
Increasing seems reasonable to me too. The problem I see is a 4.1MB gif which doesn't get thumbnailed for the pinboard view. It's not a major issue, but it seemed one that was avoidable.
I think as a practical matter to make larger image transforms work consistently the timeout will also need to be bumped. We patch that locally because otherwise Business Critical Memes are inoperable, but as a DDoS vector it's iffy for public installs to have a large timeout. I'm not sure if large files are also a problem for public installs.. T5258 has some related discussion.
A one line patch isn't a big deal, but it would be mildly nice not to have it. Maybe we could have one config -- memes.max-awesomness -- that goes from 0-11 and scales both values? 😎
I don't want to add an option, see T8227.
I'll accept a change of the constant 4 to 16, raising the hardcoded limit to 16MB. You should also change the hard-coded 10 second timeout to a larger timeout (like 60).
If you have GIFs larger than 16MB, contribute a transcoding / wemb / dedicated meme engine patch instead. The advance of hardware has failed outpace the advance of GIF sizes.
This may not actually fix the problem you're encountering, per T5258.
src/applications/files/transform/PhabricatorFileImageTransform.php | ||
---|---|---|
122–124 | Change this to 60. |
Thanks!
src/applications/files/transform/PhabricatorFileImageTransform.php | ||
---|---|---|
122–123 | Sometimes I'll sneakly rewrite these as "more than a short time resizing..." or similar to avoid the sort of soft DRY issue, but then I keep writing the constants anyway. |