mauricio / postgresql-async

Async, Netty based, database drivers for PostgreSQL and MySQL written in Scala
Apache License 2.0
1.43k stars 222 forks source link

fix mysql memory leak #242

Closed daddykotex closed 5 years ago

daddykotex commented 6 years ago

We've been investigating a leak in some of our applications for a while. It turns out that over several hours, many mysql connections created/destroyed/recycled and quite a few logger instances are left behind

Related: https://github.com/mauricio/postgresql-async/pull/86

daddykotex commented 6 years ago

We've decided to republish the library internally and here are the result after the fix:

screen shot 2018-01-16 at 11 12 33

In order, from left to right, CPU load, HEAP usage, AVG of p99 response time

JulienPotvin commented 6 years ago

Username checks out

n2o commented 6 years ago

@daddykotex sounds great, isn't it possible to republish this project for all the people, so that at least a fork of this project continues to exist? Seems like this project is dead, but it looked so promising.

daddykotex commented 6 years ago

I can republish right away but it'll be with a different maven group (com.github.daddykotex) and the thing would be untested because the test are currently failing for things that have nothing to do with this PR.

My suggestion is to publish to your internal maven repository:

sbt clean "+db-async-common/publish" "+mysql-async/publish"

This sbt command can do that for you. Replace publish by publishLocal to target your .m2.

oshai commented 6 years ago

In case you're interested, I ported this repo to Scala-free version and fixed this bug on it: https://github.com/jasync-sql/jasync-sql . we plan to fix other bugs as well when possible.