Siege ports getting reused

2.9k Views Asked by At

I am running multiple instances of siege, so siege is reusing the ports as a results some of the requests are not going through. Is there a way where the different siege instances could use different port ranges?

   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.01 secs:     146 bytes ==> 
   HTTP/1.1 200   0.00 secs:     146 bytes ==> 
   HTTP/1.1 200   0.01 secs:     146 bytes ==> 
   [alert] socket: 671299328 select timed out: Connection timed out
   [alert] socket: 788797184 select timed out: Connection timed out
   [alert] socket: 721655552 select timed out: Connection timed out
   [alert] socket: 738440960 select timed out: Connection timed out
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   [alert] socket: 822368000 select timed out: Connection timed out
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
   HTTP/1.1 200   0.01 secs:     146 bytes ==> /
2

There are 2 best solutions below

0
On

I see you have a lot of requests one after another, do you consider that you can have problems with KeepAlive.

On server sockets are opened for a little bit longer than connection alone. You can run out of ports quite qucik if KeepAlive is set to high value.

0
On

You can set net.ipv4.tcp_tw_reuse = 1 net.ipv4.tcp_tw_recycle = 1 in /etc/sysctl file and run #sysctl -p to active it. Please have a try. Hope this can help you.