Rogelio's picture

Hi, i have a problem with "exceeded the 'max_user_connections' resource"

The hosting provider give me 3GB database size limit, each time the DB reaches this size, i have to clear data to reduce the size of DB, i always did it with the same way and it reduces to 400 or 500 mb

after this, it works correctly for about 2 weeks then clear again, I did it many times in the past without any problems, but last time few minutes after the tempstore table was emptied, the site crash with 'max_user_connections', then it returns live and again crash with the same, the only way to maintain the site live permanently is empty the tempstore table about 3 times per hour.

I contacted the hosting and they told me that is a site issue, but I haven't changed anything for a long time (except for update to 1.17.3 and then 1.17.4) but nothing else

Question, is there any Backdrop or PHPMyAdmin configuration to avoid this max_user_connections or any better solution for the heavy tempstore table?

Thank you friends


klonos's picture

Hello  👋

I've never had this issue personally, but it sounds like the problem is with the number of connection attempts to the database rather with the database size (which could be a separate issue).

I found this article, which suggests that the site might be under attack: Randomizing MySQL Users For Exceeded max_questions Error

Can you please give the D7 solution in that article a go, and see if that solves the issue? I would start with a large number of random users (like 10 or something), and then lower it down to a point where it is not causing the issue again.

Please remember to come back and report here if you had success with it.

oadaeh's picture

The "exceeded the 'max_user_connections' resource" error is a MySQL/MariaDB error, and not a Backdrop CMS error.

If you are getting that error AND your cache/tempstore tables are bloating your database by 6 times, you probably need to look at mitigating spam/bot hack attempts, unless you normally have hundreds or thousands of users on your site normally filling out whatever publicly available forms you have (like comments, contact, & user registration/login forms).

Check your Backdrop CMS logs at to see what errors you have there and see if anything there might be a clue as to why your database is filling up.


Rogelio's picture

Hi klonos,

yes it is a separate issue, but for some reason the problem is gone when tempstore table is empty that's why I thought it had something to do with the size of this table, about the solution you suggest, i could resolve the problem before read the answers so i didn´t test it

hi oadaeh,

the site has +3000 to 3500 visits per day since 7 months ago, thats why i dont think its a spam/bot hack attempts, about admin/reports/dblog the only flood message i have is

"Notice: Trying to get property 'plugin_name' of non-object en mosaic_grid_preprocess_image() in .../modules/mosaic_grid/mosaic_grid.module)." 

this message shows with every visit but i don´t know if it has something to do with the "'max_user_connections' error"

i solved the problem in CPanel - MySQL - DB_Name - Repair

  • after this repair, the site comes live again and the "'max_user_connections' error" is gone

Thank you friends for the help