bihealth / sodar-docker-compose

Setup SODAR using Docker Compose
MIT License
2 stars 3 forks source link

Postgres server connections filling up #32

Closed mikkonie closed 1 year ago

mikkonie commented 1 year ago

On the production deployment of SODAR, we have had an issue where the postgres server suddenly crashes with "too many clients". This has happened sporadically, a few times within a month.

I've also observed this suddenly happening on my development environment. It would seem something is keeping connections open. I'm not sure whether it is SODAR or iRODS. When I saw this in my dev environment I had just launched SODAR for the 1st time in a while, so my guess would be iRODS which has been running in the background.

Some steps to get further with this:

To be investigated further.

mikkonie commented 1 year ago

Looking at pg_stat_activity during normal operation, I'm seeing a bunch of idle processes for ICAT originating from the iRODS host. Might be normal or not, can't tell.

It's not too many of these processes at the moment, but it's Monday morning and it's possible these accumulate over time.

I'm purely speculating, but maybe these iRODS session disconnection problems I've been observing at bihealth/sodar-server#1542 are related to these idle postgres connections and that's what's causing this problem?

Will try to monitor the situation, also attempting to reproduce this again locally in my dev environment.

mikkonie commented 1 year ago

After some more investigation, it turns out this is indeed caused by SODAR behaviour. Attempting a fix on that side, will keep this issue open until I've confirmed the problem is gone.

mikkonie commented 1 year ago

This was fixed by bihealth/sodar-server#909, closing.