'mysql error: exceeded the max connections per hour
I'm getting an error while running php script for Wordpress site on same domain:
Could not connect: User 'abc' has exceeded the 'max_connections_per_hour' resource (current value: 10)
What should be the limit for MySql database? Now should I connect to the database?
Solution 1:[1]
You exceed limit for mysql, take a look at mysql doc, and you can see this :
GRANT ALL ON customer.* TO 'francis'@'localhost'
IDENTIFIED BY 'frank'
WITH MAX_QUERIES_PER_HOUR 20
MAX_UPDATES_PER_HOUR 10
MAX_CONNECTIONS_PER_HOUR 5;
You just have to increase MAX_CONNECTIONS_PER_HOUR or to remove limit, just use this :
GRANT USAGE ON *.* TO 'francis'@'localhost' WITH MAX_CONNECTIONS_PER_HOUR 0;
To allow persistent connection on WordPress, take a look at this article (I have not tested it myself) : http://www.mydigitallife.info/using-php-mysql-persistent-connections-to-run-wordpress-blog/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Dharman |