Everyone has a test environment, but some have a separate production one 😅
3 comments
I probably figured out what happened. I have a limit on the number of simultaneously open MySQL connections. I keep track of them using a semaphore so that if the limit is exceeded, the next thread would wait for an available connection. The only slight problem is that both this waiting and the releasing of connections into the pool are done from synchronized methods. I can't believe this problem didn't show itself until now. I also can't believe how stupid I am sometimes. Setting the connection limit to 3 and running this load testing thing makes it hang every time. YIKES. |
Of course it happened while I was away from my laptop so I had to ssh into the server from my phone to take a thread dump for later analysis and restart the daemon