Max_user_connections on shared host


#1

Hi guys,
I have a cakephp site which is experiencing some performance issues. Intermittently I see the following in my cake error logs:

'2017-07-31 12:22:46 Error: [PDOException] SQLSTATE[42000] [1226] User ‘mydbname’ has exceeded the ‘max_user_connections’ resource (current value: 30)

Based on my understanding, cake should be doing the work of creating / terminating connections, so I’m not sure how to start troubleshooting / resolving this issue. Should I find a way to increase the max_user_connections? Why isn’t 1 connection enough? Should I manually close the db connections from my code?

I’m really not sure where to start. Any help at all will be GREATLY appreciated.


#2

Hi,
Please set “SET GLOBAL max_connections” in the file php.ini
According to your requirement

Thanks


#3

Thanks for your response deepvyas.
I’ll try increasing it; Is there some way -outside of trial and error - to determine what that value should be?


#4

That depends upon available free memory for allocation