# Why local ports increased so much when update from 1.0.15 to 1.2.8

**URL:** <https://www.ruby-forum.com/t/why-local-ports-increased-so-much-when-update-from-1-0-15-to-1-2-8/228734>\
**Category:** NGINX\
**Created:** [May 6, 2013, 10:42am UTC](https://www.ruby-forum.com/t/why-local-ports-increased-so-much-when-update-from-1-0-15-to-1-2-8/228734 "2013-05-06T10:42:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![selphon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ac8455/32.png) [@selphon](https://www.ruby-forum.com/u/selphon)\
**Post date:** [May 6, 2013, 10:42am UTC](https://www.ruby-forum.com/t/why-local-ports-increased-so-much-when-update-from-1-0-15-to-1-2-8/228734/1 "2013-05-06T10:42:54Z")

</div>

Recently, I updated nginx from 1.0.15 to 1.2.8, and find that the  
ports(shown by ss -s) increase much as below:

nginx/1.0.15  
Total: 21696 (kernel 22773)  
TCP: 111474 (estab 21422, closed 86149, orphaned 3803, synrecv 0,  
timewait  
86145/0), ports 1417

nginx/1.2.8  
Total: 21579 (kernel 22349)  
TCP: 57466 (estab 21295, closed 32654, orphaned 3438, synrecv 0,  
timewait  
32652/0), ports 11239

I updated nginx in order to use the ngx\_http\_upstream\_keepalive module,  
most  
ports are used by nginx to connect with squid(port:8081):

(nginx/1.2.8) netstat -anp | awk ‘$5 ~ “:8081”’ | grep -i time\_wait | wc  
-l  
10227  
(nginx/1.0.15) netstat -anp | awk ‘$5 ~ “:8081”’ | grep -i time\_wait |  
wc  
-l  
15

Is there any change that make nginx make lots of connections with squid  
and  
occupy so much ports?

Posted at Nginx Forum:

> **[Why local ports increased so much when update from 1.0.15 to 1.2.8](https://forum.nginx.org/read.php?2,238885,238885#msg-238885)**
>
> Recently, I updated nginx from 1.0.15 to 1.2.8, and find that the ports(shown by ss -s) increase much as below: nginx/1.0.15 Total: 21696 (kernel 22773) TCP: 111474 (estab 21422, closed 86149, orphaned 3803, synrecv 0, timewait 86145/0), ports 1417...
