|
|
|
|
|
by mryan
3959 days ago
|
|
Would you mind sharing some detail about the issues you had with tmp dirs and availability? I deployed Thumbor a few months ago and it's been pretty much install and forget. I'm curious about what issues I might have in future as it scales. |
|
The tmp directory is never emptied unless you restart the machine. So to get around this you have to write a cron job to remove the older downloaded and resized images. However in my load tests this caused issues with Thumbor and so I ended up having the cron job only delete files over a certain age. However this still leaves the possibility that Thumbor could fill up the entire disk and crash the machine.
Other issues were having the ability to rotate the Thumbor key. This is somewhat supported by Thumbor, in that the previous keys images will still be available but the key rotation is not done for you. I was using AWS so stored the key in a protected s3 bucket and gave roles access to pull the key and when it detected it was modified restart Thumbor.
The last an main issue was the ability to spin up a new version of Thumbor itself. In the time it took me to get it from development through to production the dependancies changed so much that facial detection broke halfway though. I fixed this initially by freezing the pip dependancies but then the underlying dependancies caused issue at a later day. In short I was unable to spin up a new version which was identical to the previous. Generally were I work we tear down and spin up fresh instances all the time so this was an issue. We resolved this by installing Thumbor in a docker container.
Don't get me wrong. A big fan of Thumbor and it was the right solution for what I needed to do but these issues really made myself and others considering paying a 3rd party for a while.