Walid Da.
Walid Da.

Reputation: 948

Incomplete response from application

I'm getting 'Incomplete response received from application' when testing my rails application. It disappears when I refresh the page.. I check my apache error logs and I found this line:

[ W 2018-08-06 07:55:32.1636 126806/T8 age/Cor/Con/InternalUtils.cpp:96 ]: [Client 1-4] Sending 502 response: application did not send a complete response

Any one faced the same issue ?

Upvotes: 1

Views: 1302

Answers (1)

Alex.U
Alex.U

Reputation: 1701

This issue has some history. Best you can do is add some debug to your application.

This happens when your application exits prematurely. To understand what this means, consider that Passenger works by sitting between the client and the app. Passenger acts like a reverse proxy, so it forwards the request to your app, then processes the response that the app sends.

client <-----> Passenger <-----> app If, after Passenger has sent the request, the app crashes or otherwise exits before sending a response, then you will see "application did not send a complete response".

So the question is actually: why does the application exit? Unfortunately I do not know, and neither does Passenger. Passenger only starts your app and expects your app to respond to requests as normal. Maybe there is a bug in the app, or the app encountered some sort of fatal error. Normally the app will print an error message when that happens, but Passenger did not encounter any such messages, or it would have printed them.

So the best thing I can recommend you to do is that you insert debugging statements inside your app and find out what makes it exit.

Upvotes: 2

Related Questions