简体   繁体   中英

Application timeout when saving a large file in rails using dragonfly

I am having trouble saving a large file, using a model with the dragonfly extension 'image_accessor'.

We are trying to save the file to an Amazon S3 server, using fog and excon. On this save, we receive the error:

A Excon::Errors::Timeout occurred in batch_uploads#upload_file:

 write timeout reached
 excon (0.14.2) lib/excon/socket.rb:124:in `rescue in write'

I suspect that the error is related to this: https://github.com/markevans/dragonfly/issues/207 but I can't be totally sure.

Does anyone have any advice on how to move forward with this?

It seems to be an Excon timeout. You can try to increase the Excon lib's default write_timeout setting.

Excon.defaults[:write_timeout] = 500

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM