As soon as I run my application Exposed seems to o...
# exposed
j
As soon as I run my application Exposed seems to open every possible connection and doesn’t close them. How can I fix it?
Copy code
database-pg=# SELECT count(*) FROM pg_stat_activity;
 count 
-------
    36
(1 row)
image.png
e
You should inspect your code to see how instances of`DbConnection` are created. I never had this issue before and based on Exposed source code, a
DbConnection
should only open one connection.
j
It’s being used only once in my code
p
Isn't that your configured connection pool which opens the connections on application startup?