FormaLMS Database Connection Issue
FormaLMS Database Connection Issue
Hey,
We are a team of three working on FormaLMS and have been configuring it to meet our requirements. Recently, we encountered a database error stating "max_connections_per_hour exceeded" (currently set to 500).
Since we cannot modify this resource limit as it may affect other employees' work, we are looking for a solution within the FormaLMS codebase itself. Could you please guide us on how to resolve this issue? Additionally, let us know which code files we should check to address this problem.
Below is the attached screenshot with its stack trace. Please let me know if it helps.
P.S. We have already verified that database connections are being properly closed.
We are a team of three working on FormaLMS and have been configuring it to meet our requirements. Recently, we encountered a database error stating "max_connections_per_hour exceeded" (currently set to 500).
Since we cannot modify this resource limit as it may affect other employees' work, we are looking for a solution within the FormaLMS codebase itself. Could you please guide us on how to resolve this issue? Additionally, let us know which code files we should check to address this problem.
Below is the attached screenshot with its stack trace. Please let me know if it helps.
P.S. We have already verified that database connections are being properly closed.
Re: FormaLMS Database Connection Issue
Hi,
I strongly encourage to host your forma instance in a dedicated vhost, not a shared one.
Anyway, you could try to alter the variable at runtime if your configuration allows such a thing.
To do that, based on your forma version, you could try to call the setting as follows:
sql_query("SET GLOBAL max_connections_per_hour = x");
where x is the wanted number.
Where to add the code?
Well, as I wrote above, it depends on your forma version, but generally it should be done at bootstrap.
I strongly encourage to host your forma instance in a dedicated vhost, not a shared one.
Anyway, you could try to alter the variable at runtime if your configuration allows such a thing.
To do that, based on your forma version, you could try to call the setting as follows:
sql_query("SET GLOBAL max_connections_per_hour = x");
where x is the wanted number.
Where to add the code?
Well, as I wrote above, it depends on your forma version, but generally it should be done at bootstrap.
Per supporto GRATUITO contattatemi in privato qui