all-in-one
all-in-one copied to clipboard
postgres FATAL: remaining connection slots are reserved for non-replication superuser connections
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- run nextcloud-aio
- produce some traffic on nextcloud e.g. by uploading 1000 small files
- sudo docker logs -f nextcloud-aio-database -> will show "FATAL: remaining connection slots are reserved for non-replication superuser connections"
- connection to db is lost
Expected behavior
nextcloud-aio can handle all necessary connections to the db
Actual behavior
see above 3 and 4
Host OS
Nextcloud AIO version
latest = Nextcloud Hub II (23.0.6)
Current channel
stable
Other valuable info
Hi, thanks for your report! Did this happen after upgrading to the latest release or already before?
I talked to a colleague regarding this and upgrading to NC24 may resolve the issue. Upgrading to NC24 is on the list for the next release so stay tuned!
See https://github.com/nextcloud/all-in-one/issues/669
I am using a fresh installation from scratch - no update has been run so far.
I did a reboot of the machine and restart of the containers and the error keeps occuring on heavy file transfers. I think this error is received from postgres and we need a different configruation of the db in nextcloud-aio re/ the max_connections allowed ...
Honestly Nextcloud should simply not spawn as many database connections so this is likely a bug. Upgrading to NC24 may resolve this.
One additional information from today:
- preview generation is running in the backgroud (manualy triggered) and paperbin for calendar entries is triggered to be emptied
- message in nextcloud protocol: "Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at "nextcloud-aio-database" (172.26.0.4), port 5432 failed: FATAL: sorry, too many clients already"
IMHO I think in the standard configuration is to narrow for nextcloud.aio and you should think about a changed configuration of postgresql.
I see so the preview generation may be the missing puzzle piece here...
However we will still try to upgrade to nc24 first and if the issue still exists afterwards. If yes we will try to increase the max connections value.
Hi, please upgrade to 1.7.0 Beta and report back if it fixes the issue. See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel If not, we will need to adjust the database config going forward. Thanks!
Updating seems to have fixed it for me.