Forum: Ruby on Rails Large uploads with attchment-fu

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Richard M. (Guest)
on 2009-01-11 13:52
(Received via mailing list)
Hi
I am trying to upload 30mb files with attachment-fu, these seem to
just hang. (works file for small image files)
I am using mongrel cluster  and nginx...

Does anyone have any advice?

Thanks

Richard
Peter De Berdt (Guest)
on 2009-01-11 13:59
(Received via mailing list)
On 11 Jan 2009, at 12:51, Richard wrote:

> I am trying to upload 30mb files with attachment-fu, these seem to
> just hang. (works file for small image files)
> I am using mongrel cluster  and nginx...
>
> Does anyone have any advice?

Check your nginx conf file and set the client_max_body property to
something higher:

client_max_body_size 50M;

It could probably be a number of other things too, but your
information is so limited it's just guess work. Try and isolate the
problem to either your rails app, mongrel or nginx.


Best regards

Peter De Berdt
MaD (Guest)
on 2009-01-11 13:59
(Received via mailing list)
maybe you got a limit in your database. you could set
  max_allowed_packet = 32M

look here: http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html
Richard M. (Guest)
on 2009-01-12 01:41
(Received via mailing list)
Peter,

Thanks for your reply, yes I should have posted the nginx.conf
contents.

But yes you were right.

It was the client_max_body_size, I changed this in the nginx.conf then
it worked!

Thanks so much for your help.

Richard
Richard M. (Guest)
on 2009-01-12 01:43
(Received via mailing list)
Thanks for the reply,

As Peter suggested I didn't write enough about my problem, I was no
actually saving my file into the database, I was saving into the file
system. But thanks for the advice. On a db based file save your answer
may have been another reason also.

All the best

Richard
This topic is locked and can not be replied to.