NextCloud 16 on OVH: has more than 'max_user_connections' active connections on sql database

I have running NextCloud 16 on an OVH WebHosting-Server.

We have a lot of timeouts on the webserver which are resulting on non-database-responses.
In the error_log, we are seeing a lot of errors like this:

Error: Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1203] User xxx already has more than ‘max_user_connections’ active connections at <>
0. /home/xxx/files/nc/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 448
OC\DB\Connection->connect()

Can I limit the max_user_connections on NextCloud side?
I can’t modify it on OVH-side.

Thanks,
Tom

I think this is usually a question which you should ask your hosting provider, because it is a database specific limit which has been set and not a Nextcloud issue.

Asking aunt G. for help shows me the following answers:

Yes, I know this. But the provider can’t or don’t want to modify it.

My questiomn is if I can Iimit it on NextCloud side?

Thanks,
Tom

How should Nextcloud override a database specific parameter? That’s technically impossible.

Nextcloud shoud take care about how many connections it will open.

The database and the database user is only used by NextCloud, so the client has to handle connections. Something like handling size of the connection pool…

A client cannot override a setting which has been set for the whole server. As far as I understood the parameter description, it is a database server dependent parameter and not database dependent one. If the database server is also only used by Nextcloud, then you should remove or increase the limit value.

1 Like