max_user_connections' resource (current value: 30)

nap

Member
Hi
My database connections exceeded max users (database current value = 30) at night but it happens anny time of the day, twice a week.
I Allready installed Redis for better caching.
Maybe it is a bot? Some of you having this same problem? I use a good professional hosting package.


  • XF\Db\Exception: User '****' has exceeded the 'max_user_connections' resource (current value: 30)
  • src/XF/Db/Mysqli/Adapter.php:160
  • Gegenereerd Door: Onbekend Account
  • 28 apr 2019 om 00:18
Stack Trace
#0 src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array)
#1 src/XF/Db/AbstractAdapter.php(60): XF\Db\Mysqli\Adapter->getConnection()
#2 src/XF/Db/Mysqli/Adapter.php(113): XF\Db\AbstractAdapter->connect()
#3 src/XF/Db/AbstractAdapter.php(516): XF\Db\Mysqli\Adapter->escapeString('addOnsComposer')
#4 src/XF/Db/AbstractAdapter.php(494): XF\Db\AbstractAdapter->quote('addOnsComposer')
#5 src/XF/DataRegistry.php(138): XF\Db\AbstractAdapter->quote(Array)
#6 src/XF/DataRegistry.php(83): XF\DataRegistry->readFromDb(Array, Array)
#7 src/XF/DataRegistry.php(226): XF\DataRegistry->get(Array)
#8 src/XF/App.php(1643): XF\DataRegistry->offsetGet('addOnsComposer')
#9 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#10 src/XF/App.php(2157): XF\Container->offsetGet('addon.composer')
#11 src/XF/App.php(1742): XF\App->setupAddOnComposerAutoload()
#12 src/XF/Pub/App.php(89): XF\App->setup(Array)
#13 src/XF.php(363): XF\Pub\App->setup(Array)
#14 src/XF.php(386): XF::setupApp('XF\\Pub\\App')
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}
 
What are the specs of your system? max_user_connections is simply used to keep MySQL in check with available system resources and prevent it from crashing the whole system, so if you have free resources available for MySQL's use you can simply raise this value and restart MySQL.

If you have a managed hosting package you can probably just open a ticket with your provider and ask them to re-evaluate this setting, letting them know you've hit the limit a few times and if you have resources available to please raise it.

Maybe it is a bot?

That's quite possible. If you let the provider know when it happened they could look over the domlogs to see if the site was getting hammered by bad bots or something.
 
  • Like
Reactions: nap
It happend only on one topic.. I deleted this topic with a few photo's in it, and now I didn't receive this error again. Strange it was a small topic with only 2 pages and some photo's.
Maybe Ill come back to you, when it happens again, for now 10 days no error.
 
Top Bottom