Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connections Never Closed #43

Closed
andrejohansson opened this issue Mar 24, 2020 · 1 comment
Closed

Connections Never Closed #43

andrejohansson opened this issue Mar 24, 2020 · 1 comment

Comments

@andrejohansson
Copy link

I have noticed that I reach MAX_CONNECTIONS quite quick by just sitting at home being 1 user and querying the database.

It seems like connections doesn´t get released. This is the same project as I uploaded in #41, with the exception that I updated diesel to latest (1.4.4).

Running select * from pg_stat_activity; shows that idle connections is filling up. But I also found that one query got spammed: SET CLIENT_ENCODING TO 'UTF8'

Any ideas of why this is happening? It´s a postgresql v12 database server on ubuntu.

image

@weiznich
Copy link
Owner

As you are using a connection pool connections should not be closed as they are part of the pool. After looking in your code I would assume that only 8 connections are open at any point of time, as the pool should contain 8 connections.

But I also found that one query got spammed: SET CLIENT_ENCODING TO 'UTF8'

That is done by diesel as part of the connection setup.

Closed because this is certainly no wundergraph issue. The question remains what and why those connections are opened. Not sure where I would search this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants