mperham / connection_pool

Generic connection pooling for Ruby
MIT License
1.63k stars 143 forks source link

2.4.1 Memory leak? #179

Closed jeremiemv closed 1 year ago

jeremiemv commented 1 year ago

Hi Mike 👋

We started having Error R14 (Memory quota exceeded) on Heroku after we released to staging this morning. The release was only a patch release of Sidekiq but the memory usage is only going up for the Web processes. So I was suspecting connection_pool's code change.

But it looks like the new code introduced an option the auto_reload_after_fork which doesn't change the default behavior. https://github.com/mperham/connection_pool/pull/177/files

We had very little to no traffic.

Happy to help troubleshoot.

Screenshot 2023-05-25 at 4 20 52 PM Screenshot 2023-05-25 at 4 17 29 PM
mperham commented 1 year ago

Hmmm, yeah I agree there's not much in Sidekiq 7.1.1 that seems suspicious.

Do you do any forking in your app code? You're the first person to report any issues so far. Can you revert them one at a time and see which reverts the behavior?

jeremiemv commented 1 year ago

After restartingthe dynos, the memory consumption is back to normal. No explanation :/

Going to close the issue.