Image corruption on upload to s3, production only. (carrierwave, engineyard)

落爺英雄遲暮 提交于 2019-12-01 18:29:18

If it only happens on the first image after a deploy, I would suspect that your app is still loading (or at least some workers are), causing high cpu usage and slowing down the upload process, which might make it timeout and corrupt the image at the same time.

I assume that Engine Yard will reload your app only on the first request, which might be why. You should try just "curling" your app after a deploy and wait a couple minutes to see if that helps.

Small instances on EC2 have a single core and can become quite slow when many workers are being restarted.

Go through the carrierwave / fog setup for EngineYard, as described here: http://www.engineyard.com/blog/2011/a-gentle-introduction-to-carrierwave/ and here: http://docs.engineyard.com/use-carrierwave-and-optionally-fog-to-upload-and-store-files.html

Is your "fog" public set to "false" or "true"? If it's "false", check this thread, as you'll need to use the "authenticated_url" property instead of what's returned: http://groups.google.com/group/carrierwave/browse_thread/thread/2f727c77864ac923

There appears to have been an issue with gzip compression on jRuby (possibly with https) that has been resolved. If anyone needs version numbers from my stack, I can oblige.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!