Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Simplest query takes 30+ seconds when move from anorm to postgresql-async #212

Open
@tpraizler

Description

@tpraizler

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions