POST to static URL and CLOSE_WAIT

Jan Andersson janne at pureload.com
Mon Oct 25 19:48:35 MSD 2010


Thanks, but I'm not sure how something like this enables posting to static files?
/Jan

On 25 okt 2010, at 12.47, Igor Janevski wrote:


> We use something like this and we don't have problems
> 
>    location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
>     if ($request_method !~ ^(GET|HEAD)$ ) {
>          return 405;
>          }
> 
>         root   /var/www;
>   }  
> 
> On 10/25/2010 12:27 PM, Jan Andersson wrote:
>> 
>> Hi,
>> we are using the following in our configuration to handle HTTP POST to static files:
>> 
>>  ...
>>  # Allow POST to static URLs
>>  error_page 405 = $uri;
>>  ...
>> 
>> This works, but during load, we start to see a lot of connections in CLOSE_WAIT state,
>> until we finally run out of connections.
>> 
>> Any idea why we see this and what can be done to avoid this?
>> 
>> We are running nginx/0.7.65 on Ubuntu 10.04:
>> 
>> /Jan



More information about the nginx mailing list