nginx passenger 504 gateway timeout

1,329 views
Skip to first unread message

Joe Williams

unread,
Apr 24, 2009, 2:09:50 PM4/24/09
to phusion-...@googlegroups.com
I am getting 504 gateway timeouts for a long running page using nginx
and passenger. To fix this using mongrel I used the following but it
doesn't seem to work with passenger.

send_timeout 300;
proxy_read_timeout 300;

What timeout controls this in passenger?

-Joe


--
Name: Joseph A. Williams
Email: j...@joetify.com
Blog: http://www.joeandmotorboat.com/

Hongli Lai

unread,
Apr 24, 2009, 3:37:29 PM4/24/09
to phusion-...@googlegroups.com
On Fri, Apr 24, 2009 at 8:09 PM, Joe Williams <j...@joetify.com> wrote:
>
> I am getting 504 gateway timeouts for a long running page using nginx
> and passenger. To fix this using mongrel I used the following but it
> doesn't seem to work with passenger.
>
> send_timeout 300;
> proxy_read_timeout 300;
>
> What timeout controls this in passenger?

At this time the timeout is hardcoded. You can change it in
ext/nginx/Configuration.c:

ngx_conf_merge_msec_value(conf->upstream.send_timeout,
prev->upstream.send_timeout, 60000);

ngx_conf_merge_msec_value(conf->upstream.read_timeout,
prev->upstream.read_timeout, 60000);

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

baldrailers

unread,
Jun 2, 2009, 4:31:08 AM6/2/09
to Phusion Passenger Discussions
How do you re-build the gem when your done editing the file?
> E-mail: i...@phusion.nl

Hongli Lai

unread,
Jun 2, 2009, 4:46:50 AM6/2/09
to phusion-...@googlegroups.com
On Tue, Jun 2, 2009 at 10:31 AM, baldrailers <baldr...@gmail.com> wrote:
>
> How do you re-build the gem when your done editing the file?

See README.TXT.

--
Phusion | The Computer Science Company

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl

Julius Francisco

unread,
Jun 2, 2009, 4:58:41 AM6/2/09
to phusion-...@googlegroups.com
Thanks! But seems to me it's not working that well.

I tried running rake on the passenger dir and so as rake nginx and still not working well.

--
Sent from my iPhone

Julius Francisco
CTO
IOasis
SKYPE: ic3m0nst3r
YM: baldrailers
AIM: yan1k0
TWITTER: ic3m0nst3r
MOB: +63.926.626.95.75

"How's my programming? Call 1-800-DEV-NULL"

Hongli Lai

unread,
Jun 2, 2009, 6:14:05 AM6/2/09
to phusion-...@googlegroups.com
On Tue, Jun 2, 2009 at 10:58 AM, Julius Francisco <baldr...@gmail.com> wrote:
> Thanks! But seems to me it's not working that well.
> I tried running rake on the passenger dir and so as rake nginx and still not
> working well.

No, you need to recompile and reinstall Nginx as well. Run
./bin/passenger-install-nginx-module.

Reply all
Reply to author
Forward
0 new messages