Page 1 of 1

"MySQL adapter mysqli is not available" error

Posted: Tue May 17, 2016 1:35 pm
by baijianpeng
Recently I notice a weird problem on my website: sometimes ( about once per week), it will crush, only show blank page with one line of message:
Error displaying the error page: Application Instantiation Error: The MySQL adapter mysqli is not available
Then I login to server via Xshell, and use this command:

Code: Select all

# reboot
After reboot, the Joomla website will work again.

So, it is very difficult to understand. I did not change any configuration or install any new software during this solution, just reboot the server, then Joomla can work again.

One thing special is: I do not use the default PHP installed by VestaCP, I use the PHP 5.6 installed byMulti PHP Selector for VestaCP from skamasle.


Could you please tell me why sometimes my Joomla can not connect to MySQLi ? Why this can be solved by reboot the server? How to fix it for ever?

Thank you.

Re: "MySQL adapter mysqli is not available" error

Posted: Tue May 17, 2016 6:29 pm
by mehargags
For the love of god please always mention your
1) OS and Distro version
2) Server specs - RAM / Cores / HDD Space

For the problem... I think you are running out of memory for MySQL. When the problem occurs, please check if your MySQL is working. Restart MySQL and check if the website comes up again.

Re: "MySQL adapter mysqli is not available" error

Posted: Thu May 19, 2016 8:28 am
by baijianpeng
Thank you for helping me.

My OS: CentOS 7 64-bit
what is Distro ?

Server Specs: 4GB memory / Single core / HDD space 100GB

When I check memory with following command:

Code: Select all

# free -m
               total        used        free      shared  buff/cache   available
Mem:           3791        3045         235          58         509         465
Maybe these problems are caused by extra PHP version 5.6.21 ? This PHP is not installed by VestaCP, it was installed by skamasle's "multi-php selector" script.

Re: "MySQL adapter mysqli is not available" error

Posted: Thu May 19, 2016 7:12 pm
by mehargags
Did you do as I said ?
When the problem occurs, please check if your MySQL is working. Restart MySQL and check if the website comes up again.
Also install htop and check memory usage... You are hitting memory limit as you see in free -m. So the most likely cause is MySQL running out of memory.

Please follow many such threads to resolve your issue, there is no magic recipe I'm afraid.

Re: "MySQL adapter mysqli is not available" error

Posted: Thu May 19, 2016 8:26 pm
by skamasle
Hi

I think you need tuning your fastcgi, if you use php-selector it run whit fastcgi, if you dont configure it, fastcgi can open a lot of child processes and you can easy run out of ram.

I get this problem whit a lot of servers when using vesta whit fastcig, some changes on configuration may solve this problem.