Original Post
Hi,
I have a program that simulates clients and datatraffic (connect to echo server, send 1k chunks 10 times, verify that it got back what it sent, reconnect)
The program will only have 100 concurrent connections.
after about 10k connections has been established (100 active, rest have been closed) I get "Cannot assign requested address". (takes maybe 5-10 seconds)
Its obvious im exhausting some sort of resource
> cat /proc/sys/net/ipv4/ip_local_port_range
55000 65535
Even when starting up the program shortly after its been terminated i still get the same problem.
Now, If I make the clients less aggressive, add some sleep, reconnect only 50% of the time, the problem does not happen, and I can go way past 10k connections.
Is this an issue with the echo server and sockets not closing properly?
Or some other system resource i am hitting that just dont want me to spam connections?
I have a program that simulates clients and datatraffic (connect to echo server, send 1k chunks 10 times, verify that it got back what it sent, reconnect)
The program will only have 100 concurrent connections.
after about 10k connections has been established (100 active, rest have been closed) I get "Cannot assign requested address". (takes maybe 5-10 seconds)
Its obvious im exhausting some sort of resource
> cat /proc/sys/net/ipv4/ip_local_port_range
55000 65535
Even when starting up the program shortly after its been terminated i still get the same problem.
Now, If I make the clients less aggressive, add some sleep, reconnect only 50% of the time, the problem does not happen, and I can go way past 10k connections.
Is this an issue with the echo server and sockets not closing properly?
Or some other system resource i am hitting that just dont want me to spam connections?