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

Lower the amount of PostgreSQL Connections created by Fody-API #2

Open
dmth opened this issue Mar 31, 2017 · 3 comments
Open

Lower the amount of PostgreSQL Connections created by Fody-API #2

dmth opened this issue Mar 31, 2017 · 3 comments

Comments

@dmth
Copy link
Contributor

dmth commented Mar 31, 2017

Currently the tickets and events api are creating alot of connections to the database. This Value could be lowered by a more intelligent design.

@bernhardreiter
Copy link
Member

bernhardreiter commented Apr 4, 2017

checkticket and contactdb backend are reusing one postgresql connection per process, what the difference to the ticket and events backends? Or are the connections build because a new process is created per request (which should not be the case when serving via wsgi hug and apache2 in the example config).

@dmth
Copy link
Contributor Author

dmth commented Apr 4, 2017

Every endpoint (/events, /tickets, /checkticket, /contactdb) creates one connection to the database.
In addition there are connections from postgresql-output, intelmq-mailgen, and contact-db expert.

This sums up to 7 simultaneous connections. I wonder why this seems to be problem.

@bernhardreiter
Copy link
Member

Some must use a different connection because they have to use different credentials.
But seven connection should be fine, we could potentially save a few, but this looks like small value. Am I right?

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