3

I am using akka-persistence-jdbc plugin for Akka Persistence in some parts of application and slick directly in another parts. After migrating the the hottest parts from direct slick usage to akka-persistence HikariCP started to throw exceptions:

WARN  com.zaxxer.hikari.pool.LeakTask    Connection leak detection triggered for connection org.postgresql.jdbc.PgConnection@3a3c8d5d, stack trace follows
java.lang.Exception: Apparent connection leak detected

That's not a problem of slow SQL queries. Explain analyze shows that PostgreSQL executes them in ~1 millisecond. But connection waits for something and not being released for minutes. Some more details on that are here.

enter image description here

akka-persistence-jdbc uses streaming for writes and reads, could it be a slick bug or something is wrong in the way akka-persistence-jdbc does such operations?

I am using slick 3.1.1, HikariCP 2.3.7, PostgreSQL 9.4 with max_connections: 120.

Andrey Kuznetsov
  • 11,640
  • 9
  • 47
  • 70

0 Answers0