we are using Postgresql as database for our moodle installation.
We setup postgresql for accepting up to 300 connections (max_connections = 300).
Now it happened twice to us, that at night the database connections filled up and postgresql stopped accepting new connections. So moodle was not available anymore. The web-/application servers did not show any increased access activity before this happened.
Did anyone experience similar behaviour? My guess is, it could be a nightly cron job of moodle, which fills up the connections, but I don't know for sure.
What are the recommendations regarding max_connections for postgresql? Are there any guidlines how many connections are needed for how many concurrent users, just as a rule of thumb?
By the way, we are using Moodle as of version 3.7+ and have 30.000+ registered users with at least 10-15.000 active at least once a day.
Best reagrds
Sven