XF 2.2 No route to host !!

REP13

Member
Hi every one i would like if someone can help to solve this probem .


  • XF\Db\Exception: No route to host
  • src/XF/Db/Mysqli/Adapter.php:165
  • Generated by: Unknown account
  • May 8, 2023 at 00:45

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/AbstractAdapter.php(83): XF\Db\AbstractAdapter->connect()
#3 src/XF/Db/AbstractAdapter.php(150): XF\Db\AbstractAdapter->query('
SELECT cach...', 1)
#4 src/XF/PermissionCache.php(32): XF\Db\AbstractAdapter->fetchOne('
SELECT cach...', 1)
#5 src/XF/PermissionSet.php(35): XF\PermissionCache->getGlobalPerms(1)
#6 src/XF/Entity/User.php(1176): XF\PermissionSet->hasGlobalPermission('general', 'view')
#7 src/XF/Pub/Controller/AbstractController.php(242): XF\Entity\User->hasPermission('general', 'view')
#8 src/XF/Pub/Controller/AbstractController.php(20): XF\Pub\Controller\AbstractController->assertViewingPermissions('Index')
#9 src/XF/Mvc/Controller.php(123): XF\Pub\Controller\AbstractController->preDispatchType('Index', Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(349): XF\Mvc\Controller->preDispatch('Index', Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(xenMade\EAS\XF\Pub\Controller\Thread), NULL)
#12 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(xenMade\EAS\XF\Pub\Controller\Thread), NULL)
#13 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#14 src/XF/App.php(2344): XF\Mvc\Dispatcher->run()
#15 src/XF.php(512): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
 
Well, where you define your mySQL connection, are you using localhost, an IP address, domain name or what? It simply looks like whatever you are using is, your hosting provider can't find the route to it (probably it's using localhost and they are now blocking it if this is something that just started happening.
First people I'd be talking to was my hosting provider.
 
Well, where you define your mySQL connection, are you using localhost, an IP address, domain name or what? It simply looks like whatever you are using is, your hosting provider can't find the route to it (probably it's using localhost and they are now blocking it if this is something that just started happening.
First people I'd be talking to was my hosting provider.
thank you for your fast reply,
the mysql is been set on a vps server and the website is on a shared hosting the reason why i do that is for the big storage that i get from the shared hosting .
the problem comes times to times like one or two times per week .
 
Its will most likely be a network issue between your site and the mySQL VPS. It could easily be a firewall issue, or simply a network connectivity issue between the two sites. If it's a recurring issue that happens on a regular basis, you need to get the VPS provider to check first.
All that is telling you is that your XF site instance cannot each the remote mySQL server, as there is no valid route to get to it. Not an XF problem but a server issue.
 
Top Bottom