XF 2.2 error - too many connections

interforo

Active member
hi,
I get this error

Code:
XF\Db\Exception: Too many connections src/XF/Db/Mysqli/Adapter.php:165
Generated by: Unknown account Jul 18, 2022 at 4:43 PM
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) "/forum/posts/7484275/react?reaction_id=1"
  ["referrer"] => string(91) "https://interfans.org/forum/threads/calciomercato-estivo-stagione-2022-23.2361962/page-6708"
  ["_GET"] => array(1) {
    ["reaction_id"] => string(1) "1"
  }
  ["_POST"] => array(4) {
    ["_xfRequestUri"] => string(70) "/forum/threads/calciomercato-estivo-stagione-2022-23.2361962/page-6708"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I am getting this error also but I only have 2 or 3 guests and just 1 or 2 members online at the same time.
Could it be my robots.txt is causing this issue? It does show I usually have over 100 bots crawling my site at all times.
 
Last edited:
Connections are connections. It doesn't matter if it's a registered member or a bot.

You can try to block all those bots (which isn't recommended) but it's better to contact your host.
I was told by my host (NameCheap) that bots don't count as connections!
They mentioned that it could be my database is not optimized.
Also they reccommend me to upgrade my package! Who would have thunk?
I just use a basic allow all robots.txt, This is it's contents.
Code:
User-agent: *
Allow: /
 
That really depends on your personal needs and location of most of your visitors.

I personally use Hetzner but they only host in Germany, Finland and the US.
 
My experience with namecheap. A member here asked them to install (on a VPS) Elasticsearch. After many failed attempts they failed and said it was not possible. I install it for the XF user in about 30 min. Namecheap = pathetic support.
 
Back
Top Bottom