<br>Hi All,<br><br>I have a website that hits by automatic scheduled job every hour from thousands sources.<br><br>last time, my website is down because of thousands CLOSE_WAIT when I check using &quot;netstat -na&quot;<br>
I already try to debug refer to <a href="http://www.ruby-forum.com/topic/204589">http://www.ruby-forum.com/topic/204589</a><br>but I don&#39;t know what to do with the debug log.<br><br>when I check the &quot;lsof -p &lt;nginx&gt;&quot;:<br>
i found a lots of sockets (CLOSE_WAIT) and file open of my 404.html.<br>i think there&#39;s a problem with my 404 configuration.<br>-----<br>nginx   10500 nobody  357r   REG        8,3        141  52396049 /home/j/html/404.html<br>
nginx   10500 nobody  359r   REG        8,3        141  52396049 /home/j/html/404.html<br>nginx   10500 nobody  360r   REG        8,3        141  52396049 /home/j/html/404.html<br>nginx   10500 nobody  362u  IPv4  174783995                  TCP 70.36.100.46:http-&gt;<a href="http://y.net:49333">y.net:49333</a> (CLOSE_WAIT)<br>
nginx   10500 nobody  363r   REG        8,3        141  52396049 /home/j/html/404.html<br>nginx   10500 nobody  365u  IPv4  174497664                  TCP 70.36.100.46:http-&gt;<a href="http://y.net:52096">y.net:52096</a> (CLOSE_WAIT)<br>
nginx   10500 nobody  366r   REG        8,3        141  52396049 /home/j/html/404.html<br>nginx   10500 nobody  369u  IPv4  174905532                  TCP 70.36.100.46:http-&gt;<a href="http://y.net:50057">y.net:50057</a> (CLOSE_WAIT)<br>
nginx   10500 nobody  370r   REG        8,3        141  52396049 /home/j/html/404.html<br>nginx   10500 nobody  371u  IPv4  174729756                  TCP 70.36.100.46:http-&gt;<a href="http://y.net:33731">y.net:33731</a> (CLOSE_WAIT)<br>
-----<br><br><br>here is my &quot;nginx -V&quot;<br>-----<br>nginx version: nginx/0.7.65<br>built by gcc 4.1.2 20080704 (Red Hat 4.1.2-46)<br>TLS SNI support disabled<br>configure arguments: --with-debug --with-http_ssl_module --pid-path=/var/run/nginx.pid --without-mail_smtp_module --without-mail_imap_module --without-mail_pop3_module --add-module=../nginx_upload_module-2.0.10/<br>
-----<br><br>here is my config:<br>-----<br>worker_processes  4;<br>error_log  logs/error.log  debug;<br>pid  /var/run/nginx.pid;<br>events {<br>    worker_connections  40960;<br>}<br>http {<br>    include       mime.types;<br>
    default_type  application/octet-stream;<br>    sendfile        on;<br>    keepalive_timeout  65;<br>    server {<br>        listen       80;<br>        server_name  localhost;<br>        location / {<br>            root   html;<br>
            index  index.html index.htm;<br>        }<br>        error_page   500 502 503 504  /50x.html;<br>        location = /50x.html {<br>            root   html;<br>        }<br>    }<br>    include /usr/local/nginx/sites-enabled/*;<br>
}<br>-----<br>server {<br>    listen       80;<br>    server_name  jj.x.y.z jj.x.y;<br><br>    access_log /usr/local/nginx/logs/jj-access.log;<br>    error_log  /usr/local/nginx/logs/jj-error.log;<br><br>    location / {<br>
        root   /home/j/html/;<br>        index  index.php index.html;<br>    }<br><br>    location ~ \.php$ {<br>        if (!-f /home/j/html/$fastcgi_script_name) { return 404; break; }<br>        fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br>
        fastcgi_index index.php;<br>        fastcgi_read_timeout 270;<br>        include /usr/local/nginx/conf/fastcgi_params;<br>        fastcgi_param SCRIPT_FILENAME /home/j/html/$fastcgi_script_name;<br>    }<br><br>    error_page   500 502 503 504  /50x.html;<br>
    location = /50x.html {<br>        root   html;<br>    }<br>    error_page   404  /404.html;<br>}<br>-----<br><br><br>does anyone have idea what&#39;s the problem?<br><br>thank you.<br><br>-- <br>regards,<br>Oon Arfiandwi<br>
<br>