# Nginx doesn't accept new connection

**URL:** <https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802>\
**Category:** NGINX\
**Created:** [October 14, 2011, 9:17am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802 "2011-10-14T09:17:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [October 14, 2011, 9:17am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802/1 "2011-10-14T09:17:02Z")

</div>

Hi there,  
I am using nginx as a reverse proxy on a Debian Linux.

The nginx is running on server A, and apache is running on server B.  
Server A is a pure proxy, server B is the real web server.

In most of time, nginx works well.  
But the HTTP port (80) will stop accepting new connection sometimes.  
When it happened, I tried to telnet port 80 from the server by “telnet  
localhost 80”, the telnet was just keeping trying but cannot make socket  
connection.

I checked the total HTTP connections by “netstat -an | grep 80 | wc  
-l”, the number was always less than 2000.

I am using nginx package from Debian Linux, the package was installed  
by apt-get.  
I added “ulimit -n 65535” into /etc/init.d/nginx to turned the “open  
files” limitation.

The problem is not resolved yet. Can anyone help?

Thanks.

Hyacinth

Posted at Nginx Forum:

> **[nginx doesn't accept new connection](https://forum.nginx.org/read.php?2,216681,216681#msg-216681)**
>
> Hi there, I am using nginx as a reverse proxy on a Debian Linux. The nginx is running on server A, and apache is running on server B. Server A is a pure proxy, server B is the real web server. In most of time, nginx works well. But the HTT

---

<div class="post-metadata">

**Author:** ![mrkissinger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@mrkissinger](https://www.ruby-forum.com/u/mrkissinger)\
**Post date:** [October 14, 2011, 9:25am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802/2 "2011-10-14T09:25:04Z")

</div>

On Fri, Oct 14, 2011 at 03:16:39AM -0400, mrkissinger wrote:

> connection.
> 
> I checked the total HTTP connections by “netstat -an | grep 80 | wc  
> -l”, the number was always less than 2000.
> 
> I am using nginx package from Debian Linux, the package was installed  
> by apt-get.  
> I added “ulimit -n 65535” into /etc/init.d/nginx to turned the “open  
> files” limitation.
> 
> The problem is not resolved yet. Can anyone help?

What does “nginx -V” show ?  
Are any alerts in error\_log ?

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![mrkissinger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@mrkissinger](https://www.ruby-forum.com/u/mrkissinger)\
**Post date:** [October 14, 2011, 9:46am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802/3 "2011-10-14T09:46:43Z")

</div>

Dell-DB:~# nginx -V  
nginx: nginx version: nginx/1.1.4  
nginx: TLS SNI support enabled  
nginx: configure arguments: --prefix=/etc/nginx  
–conf-path=/etc/nginx/nginx.conf  
–error-log-path=/var/log/nginx/error.log  
–http-client-body-temp-path=/var/lib/nginx/body  
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi  
–http-log-path=/var/log/nginx/access.log  
–http-proxy-temp-path=/var/lib/nginx/proxy  
–lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid  
–with-http\_gzip\_static\_module --with-http\_ssl\_module --with-ipv6  
–without-http\_browser\_module --without-http\_geo\_module  
–without-http\_limit\_req\_module --without-http\_limit\_zone\_module  
–without-http\_map\_module --without-http\_memcached\_module  
–without-http\_referer\_module --without-http\_scgi\_module  
–without-http\_split\_clients\_module --with-http\_stub\_status\_module  
–without-http\_ssi\_module --without-http\_userid\_module  
–without-http\_uwsgi\_module  
–add-module=/tmp/buildd/nginx-1.1.4/debian/modules/nginx-echo  
Dell-DB:~#

nginx error log is empty.

Posted at Nginx Forum:

> **[Re: nginx doesn't accept new connection](https://forum.nginx.org/read.php?2,216681,216683#msg-216683)**
>
> Hi there, I am using nginx as a reverse proxy on a Debian Linux. The nginx is running on server A, and apache is running on server B. Server A is a pure proxy, server B is the real web server. In most of time, nginx works well. But the HTT

---

<div class="post-metadata">

**Author:** ![mrkissinger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@mrkissinger](https://www.ruby-forum.com/u/mrkissinger)\
**Post date:** [October 14, 2011, 11:11am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802/4 "2011-10-14T11:11:58Z")

</div>

Any one help, please?

Posted at Nginx Forum:

> **[Re: nginx doesn't accept new connection](https://forum.nginx.org/read.php?2,216681,216690#msg-216690)**
>
> Hi there, I am using nginx as a reverse proxy on a Debian Linux. The nginx is running on server A, and apache is running on server B. Server A is a pure proxy, server B is the real web server. In most of time, nginx works well. But the HTT

---

<div class="post-metadata">

**Author:** ![mrkissinger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@mrkissinger](https://www.ruby-forum.com/u/mrkissinger)\
**Post date:** [October 17, 2011, 6:19am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802/5 "2011-10-17T06:19:12Z")

</div>

Resolved. SYN flood.

Posted at Nginx Forum:

> **[Re: nginx doesn't accept new connection](https://forum.nginx.org/read.php?2,216681,216803#msg-216803)**
>
> Hi there, I am using nginx as a reverse proxy on a Debian Linux. The nginx is running on server A, and apache is running on server B. Server A is a pure proxy, server B is the real web server. In most of time, nginx works well. But the HTT

---

<div class="post-metadata">

**Author:** ![mrkissinger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/edb3f5/32.png) [@mrkissinger](https://www.ruby-forum.com/u/mrkissinger)\
**Post date:** [October 14, 2011, 11:30am UTC](https://www.ruby-forum.com/t/nginx-doesnt-accept-new-connection/212802/6 "2011-10-14T11:30:28Z")

</div>

Some thing strange happened.

I added 2 ports (80 and 10080) to a vhost in nginx server.

When port 80 is not responsing, port 10080 works well.

It seems that the apache on server B works well, and the nginx on server  
A is still working.

The problem is that port 80 is not responsing or responses very slowly.

Any opinions?

Posted at Nginx Forum:

> **[Re: nginx doesn't accept new connection](https://forum.nginx.org/read.php?2,216681,216691#msg-216691)**
>
> Hi there, I am using nginx as a reverse proxy on a Debian Linux. The nginx is running on server A, and apache is running on server B. Server A is a pure proxy, server B is the real web server. In most of time, nginx works well. But the HTT
