Simplest query takes 30+ seconds when move from anorm to postgresql-async #212
Description
Hey,
I am not sure if this is the right place for this, but I am hopeless. need your help!
I am trying to move my app to postgresql-async from anorm, and encountered a major problem on the first refactor.
I changed one of my daos, to be fully async using postgresql-async.
This is a message I get from postgres:
[PURPLE] duration: 41353.017 ms execute 1/1: DELETE FROM audit_log WHERE company_id = $1 Detail: parameters: $1 = '30'
This delete is basically doing nothing, I tested it on an empty set.
With anorm it work perfectly, but when move to postgresql-async, it takes 30 -40 seconds.
This is even when there is nothing to delete.
I configured the connection as follow:
val url = configuration.getString("db.default.url").get
val asyncConf = URLParser.parse(url)
val factory = new PostgreSQLConnectionFactory(asyncConf.copy(ssl = SSLConfiguration(SSLConfiguration.Mode.Require)))
val poolConfiguration = PoolConfiguration.Default.copy(maxObjects = 10, maxQueueSize = 50)
new ConnectionPool(factory, poolConfiguration)
Do have an idea what is missing?
Have you encounter such behavior?
Do you have any suggestion to how to approch this?
Thank you very much!