How are you doing?
I’m having a strange problem…
I’m doing a simulation with a constant rate of 100 users p/sec, during 120. And after maybe 40 seconds, every request start failing systematically throwing the following error:
How can that be happening? The scenario I’m running only sends 100 requests per seconds, and all are finished almost immediately. Under “running” column I have pretty much all the time the value 0, so there souldn’t be any open file increment. It looks like something remains open? Could it be because of the FIN_WAIT state of the socket?
You start 100 new users/sec. Even if you scenario is very short, connections don’t get closed from the client side, even if the user is done. That’s how browsers behave too.
You don’t have a proper idle keep-alive time out on your server (5 ou 10 sec is a common value), so the server doesn’t close them either, hence the too many open files.
What kind of client behavior do you want to mimic? Many browsers or just a few bashing clients?
I thought the connection was closing but FIN_WAIT made the socket count as still open.
ulimit -Hn returned 4096. And the app was having problems while approaching the 4000. So it all made sence. I modified /etc/security/limits.conf and added
By setting the hard limit to 65535 was enough. I don’t understand how the soft limit limits anything, if everything works just by changing the hard limit.
I’m simulating many clients (particulary from smartphones), that’s why I opened different users.
I also found that I had spray.can.server.idle-timeout set to 65 seconds, in an old try to dodge an ugly timeout I was having once. I’ll remove the property so connections don’t linger.