HTTP status code 499 from long running requests

Maxim Dounin mdounin at mdounin.ru
Fri Jun 7 14:42:01 UTC 2013


Hello!

On Fri, Jun 07, 2013 at 12:23:34AM -0400, justin wrote:

> Maxim,
> 
> I dug a bit deeper and here is the nginx access log showing the 499 status
> request, and then a repost of the same request:
> 
> XX.XX.XXX.253 - - [06/Jun/2013:21:09:08 -0700] "POST /actions/execute.php
> HTTP/1.1" 499 0 "https://dev.mydomain.com/execute" "Mozilla/5.0 (Macintosh;
> Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/27.0.1453.110 Safari/537.36"
> 
> XX.XXX.XXX.253 - - [06/Jun/2013:21:11:32 -0700] "POST /actions/execute.php
> HTTP/1.1" 200 673 "https://dev.mydomain.com/execute" "Mozilla/5.0
> (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko)
> Chrome/27.0.1453.110 Safari/537.36"

Just a side note: from the log there is no reason to assume these 
requests are duplicate.

> I obviously need a solution, since I am essentially creating duplicate
> transactions. This only happens when the execute.php takes a long time
> though. In jQuery when I am making the AJAX request I am setting the timeout
> to 15 minutes. Is there anything else I can look at or try?

I would recommend reproducing the issue on a client, and looking 
into network traffic via tcpdump / browser details via built in 
tools to see why duplicate requests are sent.

On the other hand, duplicate POSTs aren't at all new - they used 
to happen due to users pressing "Submit" button multiple times.  
An obvious solution is to use some one-time form tokens.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx mailing list