This has been driving me crazy: I have a file upload controller/view that finally uploads a file with this code in the controller: File.open("#{filepath}/#{filename}", "wb") do |f| f.write(@params[:document][:file].read) end This works great for files large and small in webbrick and in on an Apache/FastCGI setup. However, on my production box which is running Lighttpd 1.4.7, this functionality fails about 50% of the time for files over 100 KB. When I say ''fail'', I mean that the file just never appears in "#{filepath}/#{filename}". The f.write command does not throw an error and no errors appear in log/production.log, log/fastcgi.crash.log or the lighttpd_error.log. Very odd. Is there some Lighttpd directive regarding upload file size I need to include in my .conf file? Some multipart chunk thing I need to know about? How should I go about getting to the bottom of this? (Please! I dread wrestling with FastCGI/Apache again.) Your help/suggestions are greatly appreciated. -- Posted via http://www.ruby-forum.com/.
I have the same issue, after 100K I have problem. Anybody has any idea? I work with file_column + imagemagick Any answer on this? Henry Poydar wrote:> This has been driving me crazy: I have a file upload controller/view > that finally uploads a file with this code in the controller: > > File.open("#{filepath}/#{filename}", "wb") do |f| > f.write(@params[:document][:file].read) > end > > This works great for files large and small in webbrick and in on an > Apache/FastCGI setup. However, on my production box which is running > Lighttpd 1.4.7, this functionality fails about 50% of the time for > files over 100 KB. When I say ''fail'', I mean that the file just never > appears in "#{filepath}/#{filename}". The f.write command does not > throw an error and no errors appear in log/production.log, > log/fastcgi.crash.log or the lighttpd_error.log. Very odd. > > Is there some Lighttpd directive regarding upload file size I need to > include in my .conf file? Some multipart chunk thing I need to know > about? How should I go about getting to the bottom of this? (Please! I > dread wrestling with FastCGI/Apache again.) > > Your help/suggestions are greatly appreciated.-- Posted via http://www.ruby-forum.com/.
Gokhan Arli wrote:> I have the same issue, after 100K I have problem. Anybody has any idea? > I work with file_column + imagemagick > > Any answer on this? >For me the answer was to clear the cache I had stowed in lib/image_upload_cache, make sure permissions were correct everywhere, clearing all past ruby session files and restarting the server. I''m not sure where file_column caches things, but I would try and find out and clear it out. HTH -- Posted via http://www.ruby-forum.com/.
Hi Henry, I was hitting an upload limit of 4mb, which was solved on the latest lighty release, 1.4.8. Also, if you''re using Safari (I believe there some issues with IE/PC as well), it might be worth adding this to your lighttpd.conf: $HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" { server.max-keep-alive-requests = 0 } Safari would choke on uploads above 64K, there was a thread about this on textdrive i think - Oliver 2005/12/14, Henry Poydar <hpoydar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Gokhan Arli wrote: > > I have the same issue, after 100K I have problem. Anybody has any idea? > > I work with file_column + imagemagick > > > > Any answer on this? > > > > For me the answer was to clear the cache I had stowed in > lib/image_upload_cache, make sure permissions were correct everywhere, > clearing all past ruby session files and restarting the server. I''m not > sure where file_column caches things, but I would try and find out and > clear it out. HTH > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
(not sure whether the keep-alive-requests was solved on 1.4.8, btw... might have) 2005/12/15, Oliver Barnes <ol1barn3s-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> Hi Henry, > > I was hitting an upload limit of 4mb, which was solved on the latest > lighty release, 1.4.8. Also, if you''re using Safari (I believe there > some issues with IE/PC as well), it might be worth adding this to your > lighttpd.conf: > > $HTTP["useragent"] =~ "^(.*MSIE.*)|(.*AppleWebKit.*)$" { > server.max-keep-alive-requests = 0 > } > > Safari would choke on uploads above 64K, there was a thread about this > on textdrive i think > > - Oliver > > 2005/12/14, Henry Poydar <hpoydar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > Gokhan Arli wrote: > > > I have the same issue, after 100K I have problem. Anybody has any idea? > > > I work with file_column + imagemagick > > > > > > Any answer on this? > > > > > > > For me the answer was to clear the cache I had stowed in > > lib/image_upload_cache, make sure permissions were correct everywhere, > > clearing all past ruby session files and restarting the server. I''m not > > sure where file_column caches things, but I would try and find out and > > clear it out. HTH > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >