FastCGI times out?

Hello there,
So I’m still struggling with this fastcgi stuff. I’m trying to upload
and
process a decent sized ZIP file, but the request dies before it finishes
and
I get the following error:

FastCGI: comm with (dynamic) server
“/Users/ryan/Workspace/rails/photos/public/dispatch.fcgi” aborted:
(first
read) idle timeout (30 sec), referer: http://photos/album/new/4
FastCGI: incomplete headers (0 bytes) received from server
“/Users/ryan/Workspace/rails/photos/public/dispatch.fcgi”, referer:
http://photos/album/new/4

The weird part is that the request goes through fine and actually
finishes
(on the RoR side, committing all db queries and everything) even though
I
get a “Application Failed To Start Properly” response from the server.
Now
the uploads could take hours for all I know. They could be very large
files. But I don’t want to raise my timeout interval to a very large
number. When I used lighttpd, this wasn’t an issue. How do I fix this
in
apache now?

Thanks, Ryan

View this message in context:
http://www.nabble.com/FastCGI-times-out--t1795854.html#a4893815
Sent from the RubyOnRails Users forum at Nabble.com.

Do me a favour and try this using Firefox.

On 6/16/06, Wuher [email protected] wrote:

“/Users/ryan/Workspace/rails/photos/public/dispatch.fcgi”, referer:
Thanks, Ryan

View this message in context: http://www.nabble.com/FastCGI-times-out--t1795854.html#a4893815
Sent from the RubyOnRails Users forum at Nabble.com.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Safari has a bug when uploading files. Works fine on most servers but
sometimes it freaks out on some server setups. Just wanted to
eliminate that before you went into some gigantic bug hunting.

I wonder though? Why are you moving from Lighty to Apache? Usually
people go the other way around.

On 6/16/06, Ryan S. [email protected] wrote:

http://photos/album/new/4


[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

I do all my development using Firefox (for OSX)… that’s all I use
until I start testing. I’m not sure how that would change things
though.

Thanks, Ryan

HI folk,

Are you using Apache 2.0 ?
If so, there are some problems like this in the combination of
mod_fastCGI
with Apache 2.0.
To fix this issue, try to use mod_fcgid with Apache 2.0. This is just an
advanced version of fastCGI thats it.

Try this,

All the Best.

I want to be able to use a file upload progress bar. I’ve read about
lighty and apparently they took out that capability a few versions
back. From what I can tell, I needed to switch back to apache to use
it. If that’s not the case, I’d love to keep using lighty.

Thanks, Ryan

Hi,

The link which you have provided, is working fine for me.
what is your problem.

I am using Apache 2.0 and I have read about mod_fdcgid… but I
couldn’t get it working for a while. But once I got mod_fastcgi
going, I tried mod_fcgid as well, and it worked! But I’m still
getting the timeout error, but in a different form. In this case I
get the following error after about 30 seconds:

Premature end of script headers: dispatch.fcgi, referer:
http://photos/album/new/4

But with this error, the rails process starts getting everything going
(sql queries, etc) but once it hits its ‘time limit’ it craps out,
rolling everything back.

Thanks, Ryan

Wuher wrote:

Hello there,
So I’m still struggling with this fastcgi stuff. I’m trying to upload

Have you considered Mongrel? They have a plugin for the upload progress
and Mongrel hooks up rather easily to Apache.

I don’t really know much about Mongrel. Well, I just looked into it
after reading your post, and it doesn’t look like there is much
documentation. The links on the official site for Apache turn up a
blank page, so that isn’t much help, and the upload progress plugin
seems more like a hack. (I’m going to have to apply patches
manually?) I feel like this would take me forever to setup and the
chances of it working are slim to none without much of any
documentation.

If you can’t tell, I’m a bit of a noob when it comes to this. I’ve
taken a pretty bit hit to my confidence now that I can’t seem to get
this working (which seems trivial) with any of the following:

lighttpd + fastcgi
apache + fastcgi
apache + fcgid

It’s quite frustrating.

My ultimate goal is to get this upload progress bar working. Has
anyone done this successfully? If so, with what? I’m on a mac, so
any mac users would be extra helpful.

Thanks, Ryan

Ryan S. wrote:

But I’m still
getting the timeout error, but in a different form. In this case I
get the following error after about 30 seconds:

This is a setting in the fcgid.conf. Here’s what mine has…maybe this
will help:

AddHandler fcgid-script .fcgi SocketPath /var/lib/apache2/fcgid/sock DefaultInitEnv RAILS_ENV development #idle timeout in seconds IdleTimeout 3600 #interval to scan for timeouts in seconds IdleScanInterval 60 #process will be terminated if single request takes longer than 60 seconds BusyTimeout 60 #total fcgid processes MaxProcessCount 8 #communication timeout in seconds IPCCommTimeout 60 #connection timeout in seconds IPCConnectTimeout 10 DefaultMaxClassProcessCount 2 ProcessLifeTime 7200

I’m sorry if this is a really stupid question. But the current
version of Lighttpd does not support the upload progress feature
(after 1.4.4 I believe). If I use Mongrel, will the plugin get around
that problem, or do I still need to use Apache in order to make upload
progress work?

Any literature on how this stuff works would be greatly appreciated…
because right now it’s just a bunch of fuzzy magic to me.

Thanks, Ryan

On Fri, 2006-06-16 at 14:19 -0400, Ryan S. wrote:

I don’t really know much about Mongrel. Well, I just looked into it
after reading your post, and it doesn’t look like there is much
documentation. The links on the official site for Apache turn up a
blank page, so that isn’t much help, and the upload progress plugin
seems more like a hack. (I’m going to have to apply patches
manually?) I feel like this would take me forever to setup and the
chances of it working are slim to none without much of any
documentation.

Ryan,

I’m currently cranking docs for apache that will be posted after the
official 0.3.13 release. I’d say, wait for the official release, then
grab it and run your app under mongrel to make sure it all runs. Then
when I get the apache docs up do the install and you’re set.


Zed A. Shaw

http://mongrel.rubyforge.org/