I was getting the problem described at http://sean.treadway.info/articles/2005/12/24/open-season-for-eagain and was able to fix it with the patch at that page. Have an ebuild for this...
Created attachment 85620 [details, diff] Patch to ruby-fcgi to disable non-blocking socket
Created attachment 85621 [details] ebuild of 0.8.6 with the patch
ooops.. this didn't completely fix the problem. For some reason, I did get two successful uploads after making the change, and then the problem re-appeared. Seems to actually be a problem with combining apache https and ProxyPass to lighttpd. If I connect to lighttpd directly, the upload works fine. The problem only arises when I put apache https as a reverse proxy in front of it... e.
More info: I changed /usr/lib/ruby/1.8/cgi.rb:981 to: raise EOFError, "bad content body (CL=#{content_length}) '#{boundary}' != '#{status}'" and I get: [28/Apr/2006:17:08:15 :: 1804] Dispatcher failed to catch: bad content body (CL=83346) '-----------------------------25662295697298' != 'XXXXXXXX data from the middle of my file XXXXXXXX' (EOFError) /usr/lib/ruby/1.8/cgi.rb:981:in `read_multipart' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/raw_post_data_fix.rb:20:in `initialize_query' /usr/lib/ruby/1.8/cgi.rb:2270:in `initialize' (eval):16:in `initialize' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:600:in `each_cgi' /usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:53:in `process!' /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/fcgi_handler.rb:23:in `process!' /u/apps/hp_ald/current/public/dispatch.fcgi:24 almost killed by this error Where the multipart handler is expecting to read the boundary, it is actually reading data from the middle of my file (about 10k into it). Also, the problem only happens if it's apache reverse proxy for https. Reverse proxy for http works fine..
what browser where you using, which version of lighttpd and what size where the files? please also try version 1.4.11 of lighttpd and checkout the list of knon bugs for it at http://trac.lighttpd.net/trac/wiki/Release-1.4.11-bugs i am just speculating here, sorry.
If your problem is with the ruby-fcgi bindings, this is not the place to report it. We can't be applying patches that aren't accepted upstream either (not that I know it isn't). Please either make sure this is a problem with how we have packaged the bindings, or report this upstream. Please reopen if you think this really belongs here.
The patch described here seem to be in ruby-fcgi 0.8.7 which we don't have in portage yet. I may be able to bump it later this week.