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

前端 未结 3 1942
时光说笑
时光说笑 2021-01-19 03:11

I am using carrierwave to upload images to amazon s3. This works great on development, but not when I push it to my server (engineyard cloud trial).

The process w

3条回答
  •  [愿得一人]
    2021-01-19 03:56

    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.

提交回复
热议问题