# Crash in actionpack on uploading files to the server

**URL:** <https://www.ruby-forum.com/t/crash-in-actionpack-on-uploading-files-to-the-server/140246>\
**Category:** Rails\
**Created:** [June 12, 2008, 9:24am UTC](https://www.ruby-forum.com/t/crash-in-actionpack-on-uploading-files-to-the-server/140246 "2008-06-12T09:24:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_Sanders](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bcef8e/32.png) [@Tim\_Sanders](https://www.ruby-forum.com/u/Tim_Sanders)\
**Post date:** [June 12, 2008, 9:24am UTC](https://www.ruby-forum.com/t/crash-in-actionpack-on-uploading-files-to-the-server/140246/1 "2008-06-12T09:24:39Z")

</div>

I have a working Rails application that allows users to upload files  
in a couple of places. I recently converted from doing my development  
on a Linux box to OS X 10.5 and also upgraded from Rails 1.1.6 to  
Rails 2.1. I thought everything was working fine, but I just  
discovered that the app crashes whenever I try to upload a file on the  
OS X development system (it still works fine in production on Linux.)  
Both systems are using Apache 2.x and are running mod\_fcgid for  
fastCGI.

When I try to upload a file on the OS X version I get the following in  
the log:  
/!\ FAILSAFE /!\ Wed Jun 11 17:33:03 -0700 2008  
Status: 500 Internal Server Error  
protocol error  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
request.r  
b:573:in `read' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ request.r b:573:in`read\_multipart’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
request.r  
b:547:in `loop' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ request.r b:547:in`read\_multipart’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
request.r  
b:470:in `parse_multipart_form_parameters' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ request.r b:400:in`parse\_formatted\_request\_parameters’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
cgi\_proce  
ss.rb:80:in `request_parameters' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ request.r b:304:in`parameters’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
request.r  
b:22:in `request_method' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ request.r b:35:in`method’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
routing/r  
oute\_set.rb:431:in `extract_request_environment' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ routing/r oute_set.rb:384:in`recognize’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatche  
r.rb:148:in `handle_request' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatche r.rb:107:in`dispatch’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatche  
r.rb:104:in `synchronize' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatche r.rb:104:in`dispatch’  
/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action\_controller/  
dispatche  
r.rb:120:in `dispatch_cgi' /Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/action_controller/ dispatche r.rb:35:in`dispatch’  
/Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi\_handler.rb:103:in  
`process_ request' /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:153:in`with\_sig  
nal\_handler’  
/Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi\_handler.rb:101:in  
`process_ request' /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:78:in`process\_e  
ach\_request’  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/  
ruby/gems/1.8  
/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ ruby/gems/1.8 /gems/fcgi-0.8.7/lib/fcgi.rb:609:in`each’  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/  
ruby/gems/1.8  
/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi' /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:77:in`process\_e  
ach\_request’  
/Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi\_handler.rb:76:in  
`catch' /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:76:in`process\_e  
ach\_request’  
/Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi\_handler.rb:50:in  
`process!' /Library/Ruby/Gems/1.8/gems/rails-2.1.0/lib/fcgi_handler.rb:24:in`process!’  
/Users/tsanders/code/DFDialogDatabase/public/dispatch.fcgi:24

In fastcgi.crash.log I get the following:  
[11/Jun/2008:17:33:07 :: 16969] asked to stop immediately  
[11/Jun/2008:17:33:07 :: 16969] stopping after explicit exit

And the apache error\_log shows:  
[Wed Jun 11 17:33:03 2008] [warn] (35)Resource temporarily  
unavailable: mod\_fcgid: write data to fastcgi server error  
[Wed Jun 11 17:33:13 2008] [notice] mod\_fcgid: process /Users/tsanders/  
code/DFDialogDatabase/public/dispatch.fcgi(16969) exit(communication  
error), terminated by calling exit(), return code: 0

As you can see this crashes before even getting to my controller code,  
apparently while trying to parse the request passed in. My guess is  
that there’s some sort permission problem with creating the temporary  
file to pass in params, but that’s just a guess. I’m hoping somebody  
out there who’s more familiar with actionpack can tell me more. I  
don’t know that it’s related to being on OS X particularly, but like I  
said the exact same code and view works on a linux box, so it seems  
the most likely culprit.
