I have the following configuration on dotcloud:
Problem: I have a particular request that does some processing in the backend. The client(PHP) sends the request to the server(Rails) and is blocking until the process is executed in the backend (which is normal). The problem is that after a certain time (aprox 80s) the website redirects me to a page 405 Not Allowed Nginx. In the access logs of both the PHP and Rails service I have a 499 status code for the request - which obviously means that the client disconnected (aka the PHP service I guess)
On top of this in the logs of the Rails service I also get:
I've set the following variables in nginx.conf in the hope that will solve something but it didn't. The moment when the PHP Service stops waiting for a response is constant at around 80 sec.
Any ideas are appreciated. Thanks.
asked Feb 13 '12doctrackr
3 ● 1 ● 1 ● 4
As you've noted, 499s occur when a client disconnects from Nginx before it has had the chance to return a response. It sounds, then, like your PHP process is disconnecting before processing has completed.
If you're using curl from PHP to create your connection, you might want to try using the
I'm a little skeptical that this will work, though, because I believe that if no
A better long-term solution would be to not rely on the connection remaining open indefinitely, and return a response after, say, 30 seconds that instructs the client to reconnect to continue waiting on the response. Obviously this is a bit more tricky to implement, though.
answered Feb 14 '12gabriel
71 ● 7
Asked: Feb 13 '12
Seen: 1,302 times
Last updated: Feb 14 '12
Copyright DotCloud, 2011. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.