Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser

51 views
Skip to first unread message

akshar jamgaonkar

unread,
Aug 29, 2016, 8:02:52 AM8/29/16
to phusion-...@googlegroups.com
 am facing a issue in which the request / response flow is not completing and I see an error message in passenger.log file as below and user is not clicking any close button:

Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser

  proxy_read_timeout 400s;
  client_body_timeout 180s;
  keepalive_timeout 180s;
  client_header_timeout 180s;

I have tried to set the above config values but it still does not work, can anyone please let me know what could be going wrong.

Not sure if this is a configuration issue, any help would be appreciated, Thanks.



Daniel Knoppel

unread,
Aug 29, 2016, 8:48:09 AM8/29/16
to Phusion Passenger Discussions
If the user aborts a request then there is no way to send the response, because the user isn't listening for it anymore; doesn't want the reply.

- Daniel

akshar jamgaonkar

unread,
Aug 29, 2016, 8:54:48 AM8/29/16
to Phusion Passenger Discussions
Hello Daniel,

The issue is that user is not clicking close anywhere.

Daniel Knoppel

unread,
Aug 29, 2016, 9:16:31 AM8/29/16
to Phusion Passenger Discussions
The text is not ideally worded, but in general it means the client is refusing to accept a response, which could be due to a stop button, or also just if the program or script on the user side aborts.

Such situations are not caused by Passenger and cannot be fixed by Passenger so you should investigate the application.

Passenger can help with this if you set the log level to 7, which will show for example to which request(s) this happens.

- Daniel

akshar jamgaonkar

unread,
Aug 29, 2016, 9:26:07 AM8/29/16
to Phusion Passenger Discussions
Hello Daniel,


Thanks for your reply. can you please tell me where can i specify the log level to 7. In which file? Thanks.


On Monday, 29 August 2016 17:32:52 UTC+5:30, akshar jamgaonkar wrote:

Daniel Knoppel

unread,
Aug 29, 2016, 9:29:58 AM8/29/16
to Phusion Passenger Discussions
That depends on how you're using passenger exactly, but this might help:

- Daniel

akshar jamgaonkar

unread,
Aug 29, 2016, 10:59:11 AM8/29/16
to Phusion Passenger Discussions
Hello Daniel,

The log information was not much usefull, i suspect that something is timing out. I am actually issuing a ajax call which displays a popu, the popup receives a response of success and prematurely closes even though the request is not complete. 

I think something is timing out but not sure if it is at passenger level or ngnix level, Can you please suggest how i can identify it. Thanks.



On Monday, 29 August 2016 17:32:52 UTC+5:30, akshar jamgaonkar wrote:

Daniel Knoppel

unread,
Aug 30, 2016, 10:51:46 AM8/30/16
to Phusion Passenger Discussions
If you can describe in steps what you are doing exactly (and what you expect would happen), and provide the level 7 log next to it, I could have a look.

- Daniel

akshar jamgaonkar

unread,
Aug 30, 2016, 11:18:14 AM8/30/16
to Phusion Passenger Discussions
Hello Daniel,

I am issuing a request from browser via ajax and send the request for processing, once the ajax call is made i show a popup with progress bar, the popup remains on page for roughly any where between 2 to 4 mins and closes abruptly. When i see the request via chrome network tab i see that request is stalled for the same duration for which popup displays. I see that the logic is executing in the background as expected but the popup did not wait for the response and closes before it is supposed to.

I have set the log level to 7 and i see the below information

if there are 50 records to be processed i see this information before each of those 50 records start the processing(i.e i see the below line 50 times) 

[ pid=29768 thr=70024879087720 file=abstract_request_handler.rb:472 time=2016-08-30 08:06:43.250 ]: Accepting new request on main socket



and lastly i see this 

[ pid=29571 thr=139782938920704 file=ext/nginx/HelperAgent.cpp:923 time=2016-08-30 08:10:32.682 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.



can you please let me know what could be going wrong, Thanks.


Daniel Knoppel

unread,
Aug 31, 2016, 5:46:04 AM8/31/16
to Phusion Passenger Discussions
I can't help based on just two lines from the log, the entire log is needed.

Also, you should check the browser javascript log on the client side.

- Daniel

akshar jamgaonkar

unread,
Aug 31, 2016, 7:19:46 AM8/31/16
to Phusion Passenger Discussions
Hello Daniel.

This is only thing printed in the log when i set it to level 7, for each request.

I also don't see any error in JS log, but when i observed the same in chrome i see that the request remain in stagnant set for a set of duration before it terminates

Daniel Knoppel

unread,
Aug 31, 2016, 8:13:31 PM8/31/16
to Phusion Passenger Discussions
A passenger log at level 7 prints a lot of things like the incoming request bytes, transfer, forward and response, etc.

- Daniel
Reply all
Reply to author
Forward
0 new messages