Puma version - 5.6.5 JRuby version - 9.1.17.0
JRuby application, running on a Puma server hosted on a Windows server, is encountering intermittent "connection refused" errors. These errors tend to manifest sporadically, especially as the number of requests increases (100-1000 requests). The server resource usage is quite low, with CPU utilization staying below 30% and over 4 GB of free RAM available.
Based on our investigation, it appears that these errors arise when all available threads are busy serving requests. It seems that request queuing is not functioning as expected. I attempted to adjust the backlog count and worker thread configurations, but unfortunately, these adjustments are not working in this JRuby version of Puma. As a workaround, I increased the thread count (8:128) during startup, which did reduce the frequency of the occurrence. However, I am uncertain if significantly increasing the thread count is advisable, given that the application runs on a 32-core machine.
Any help in providing insights or recommendations to address this problem would be greatly appreciated.