# Having lot of waiting connection will cause high CPU usage?

**URL:** <https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446>\
**Category:** NGINX\
**Created:** [November 12, 2012, 4:30pm UTC](https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446 "2012-11-12T16:30:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 12, 2012, 4:30pm UTC](https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446/1 "2012-11-12T16:30:07Z")

</div>

Hi,

In one of my server, the nginx status return the following

Active connections: 3595  
server accepts handled requests  
95329528 95329528 118118629  
Reading: 334 Writing: 49 Waiting: 3212

There are a lot of “Waiting” connection, and the CPU load average is  
around  
2, I am using the default Keep alive timeout of 65s.

I am thinking what should be done in order to reduce the load average.  
(I  
am using SSL for the connection)

Thanks.

---

<div class="post-metadata">

**Author:** ![howard\_chen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@howard\_chen](https://www.ruby-forum.com/u/howard_chen)\
**Post date:** [November 27, 2012, 8:36pm UTC](https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446/2 "2012-11-27T20:36:11Z")

</div>

Could you post 10 line of this command :

Have you insert reset\_timedout\_connection directive to your conf?

---

<div class="post-metadata">

**Author:** ![howard\_chen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@howard\_chen](https://www.ruby-forum.com/u/howard_chen)\
**Post date:** [November 28, 2012, 5:08pm UTC](https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446/3 "2012-11-28T17:08:40Z")

</div>

On Wed, Nov 28, 2012 at 3:35 AM, antituhan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Could you post 10 line of this command :

Which command?

Thanks.

---

<div class="post-metadata">

**Author:** ![howard\_chen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@howard\_chen](https://www.ruby-forum.com/u/howard_chen)\
**Post date:** [November 28, 2012, 5:13pm UTC](https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446/4 "2012-11-28T17:13:21Z")

</div>

Type _vmstat 1_

---

<div class="post-metadata">

**Author:** ![howard\_chen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bbce88/32.png) [@howard\_chen](https://www.ruby-forum.com/u/howard_chen)\
**Post date:** [December 6, 2012, 5:03pm UTC](https://www.ruby-forum.com/t/having-lot-of-waiting-connection-will-cause-high-cpu-usage/224446/5 "2012-12-06T17:03:26Z")

</div>

Hi,

Really sorry for the late reply.

My vmstat 1 is:

procs -----------memory---------- —swap-- -----io---- -system–  
----cpu----  
r b swpd free buff cache si so bi bo in cs us sy  
id  
wa  
1 0 15536 40376 47352 1017532 0 0 5 11 1 0 13 26  
61 0  
3 0 15536 40624 47360 1017420 0 0 0 20 8094 3010 19 29  
53 0  
1 0 15536 40128 47360 1017492 0 0 0 0 8338 2893 19 32  
49 0  
1 0 15536 40096 47360 1017576 0 0 0 0 8724 3118 27 29  
45 0  
2 0 15536 39880 47360 1017684 0 0 0 8 9030 3155 27 25  
47 0  
3 0 15536 39632 47368 1017792 0 0 0 56 9053 2969 26 28  
46 0  
2 0 15536 39260 47376 1017892 0 0 0 20 8549 3094 22 26  
52 0  
2 0 15536 39260 47376 1017864 0 0 0 0 8637 3228 23 26  
51 0  
4 0 15536 39064 47380 1017472 0 0 4 0 8571 3142 24 28  
48 0  
4 0 15536 39592 47380 1017440 0 0 0 20 8683 3084 26 27  
47 0  
2 0 15536 39468 47388 1017476 0 0 0 148 8730 3154 30 24  
46 0
