on 2007-06-10 16:51
on 2007-06-11 17:51
> Sun Jun 10 10:46:34 -0400 2007: Error calling Dispatcher.dispatch > #<Errno::EMFILE: Too many open files - /tmp/CGI.6962.248> That looks like a system error. Ie, the OS is reporting that the user running the rails app is trying to open a file when the per-user limit for open files has been reached. What's the OS? steve
on 2007-06-11 21:06
Steve Rawlinson wrote: > That looks like a system error. Ie, the OS is reporting that the user > running the rails app is trying to open a file when the per-user limit > for open files has been reached. > > What's the OS? OS X - I don't understand why removing select fields would change the behavior (cause the error to cease). But who knows, maybe the cgi creates a temp file for every form input or something. There are only two file field inputs, and even if I comment them out (but keep the form as multipart), I still get the error.
on 2007-06-11 22:06
As a test, type the following at a Darwin shell: ulimit -n [reports the number of allowed open files] ulimit -n unlimited [raises the limit ot the max allowed] ulimit -n [confirms the limit has been raised] script/server Then use the form and see if the problem goes away. steve
on 2007-06-12 16:02
Thanks, "ulimit -n 1024" fixed the problem. It was set to 256.
on 2007-06-12 17:10
Blake Miller wrote: > Thanks, "ulimit -n 1024" fixed the problem. It was set to 256. That still means your app is opening more than 256 files which unless you're doing something really odd is not good. You can use 'lsof' to see what's open. steve