James Richard
James Richard

Reputation: 1535

Phusion Passenger Rails Service Unavailable on long-running request

I'm having some problems getting a long-running request to work on a server. It's using Phusion Passenger on Apache2, and we have one request that involves a big report being generated. It's not visible to end-users, just for backend tracking, so this error isn't occurring a lot. Just on this one request. The apache log is very unhelpful only reporting:

[ pid=10570 thr=140294434944864 file=ext/apache2/Hooks.cpp:783 time=2012-03-26 19:43:58.116 ]: Either the vistor clicked on the 'Stop' button in the web browser, or the visitor's connection has stalled and couldn't receive the data that Apache is sending to it. As a result, you will probably see a 'Broken Pipe' error in this log file. Please ignore it, this is normal. You might also want to increase Apache's TimeOut configuration option if you experience this problem often.

However, there is no broken pipe. I'm not losing connection, the Apache timeout isn't being reached (it's stopping about 30 seconds after the request), and I'm not canceling my request.

The configurations are all pretty much on default, minus the virtual hosts. This is on Ubuntu 11.04.

Upvotes: 0

Views: 1195

Answers (1)

nateleavitt
nateleavitt

Reputation: 1250

Without knowing what your specific setup or apache config file settings are, I would highly suggest that you push this off to a background process using something simple like delayed_job (https://github.com/collectiveidea/delayed_job). Then you won't be reliant on Apache and Passenger.

Upvotes: 1

Related Questions