'why does number of open sockets reported by lsof exceeds kern.ipc.somaxconn

I'm running bunch of rest tests (testNg and rest-assured based) against my app deployed locally in a docker container. Each test initiates +10 http requests in average up to 12 tests in parallel. Out of curiosity I checked number of open connections on app's port:

lsof -i -P | grep "localhost:9001 " | wc -l)

and it gave me enormous number 400-800.

I'm pretty confident that i'm missing something, but I expected that total number of open sockets is limited by kern.ipc.somaxconn which is 128 on my system.

How is it possible that i have that many open connections.

Thank you in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source