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.)
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 P. 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.)
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
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: