XF 2.2 max_user_connections error from time to time

Katorakte

New member
Hello fellows,
we have successfully move our site from vB4 to Xenforo.
It has been several days since we have started using the forum.
From time to time i see max_user_connections errors on admin portal.
Most of the errors happen at the same minute .
I suspect this has a relationship with cron jobs.
Many of the error links has .rss at the end.What could be the reason ?
We are not able to increase max_user_connections value due to being hosted on a shared host package.

An example error :


Server error log
  • XF\Db\Exception: User x_xenforo already has more than 'max_user_connections' active connections
  • src/XF/Db/Mysqli/Adapter.php:165
  • Generated by: Unknown account
  • 3 May 2022 at 00:12

Stack trace​

#0 src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array)
#1 src/XF/Db/AbstractAdapter.php(62): XF\Db\Mysqli\Adapter->getConnection()
#2 src/XF/Db/Mysqli/Adapter.php(113): XF\Db\AbstractAdapter->connect()
#3 src/XF/Db/AbstractAdapter.php(518): XF\Db\Mysqli\Adapter->escapeString('addOnsComposer')
#4 src/XF/Db/AbstractAdapter.php(496): XF\Db\AbstractAdapter->quote('addOnsComposer')
#5 src/XF/DataRegistry.php(139): XF\Db\AbstractAdapter->quote(Array)
#6 src/XF/DataRegistry.php(84): XF\DataRegistry->readFromDb(Array, Array)
#7 src/XF/DataRegistry.php(228): XF\DataRegistry->get(Array)
#8 src/XF/App.php(1797): XF\DataRegistry->offsetGet('addOnsComposer')
#9 src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#10 src/XF/App.php(2325): XF\Container->offsetGet('addon.composer')
#11 src/XF/App.php(1896): XF\App->setupAddOnComposerAutoload()
#12 src/XF/Pub/App.php(93): XF\App->setup(Array)
#13 src/XF.php(497): XF\Pub\App->setup(Array)
#14 src/XF.php(520): XF::setupApp('XF\\Pub\\App')
#15 index.php(20): XF::runApp('XF\\Pub\\App')
#16 {main}

Request state​

array(4) {
["url"] => string(40) "/index.php?forums/gla-class.81/index.rss"
["referrer"] => bool(false)
["_GET"] => array(1) {
["forums/gla-class_81/index_rss"] => string(0) ""
}
["_POST"] => array(0) {
}
}

http://mbclubtr.com/admin.php?logs/server-errors/32/delete
 
Still getting those errors : https://prnt.sc/B3Pk72fTEj4b

any help ?
Probably this will happen on shared hosting plans,
Check this out!
 

Sim

Well-known member
There is a chance that something in your configuration or an addon you are using is consuming too many resources - but tracking that down and fixing it is going to be a lot more work and there's no guarantee it will actually be fixable given the resource constraints you have.

A moderately busy XenForo forum is going to use a lot of connections to MySQL, and any slow processes (especially if also limited by RAM and thus causing swapping) is simply going to increase the number of connections required because some processes will have to wait longer for a response from the database server due to slow processing time.

The fact that you are on shared hosting means you are not going to be able to improve the database performance - and thus I think it unlikely that you'll be able to improve the number of connections you are using.

As suggested by Brogan, it's time for you to find a new host, you've outgrown the one you have now.
 
Top