Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

"MySQL adapter mysqli is not available" error

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
5 posts • Page 1 of 1
baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

"MySQL adapter mysqli is not available" error
  • Quote

Post by baijianpeng » Tue May 17, 2016 1:35 pm

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: "MySQL adapter mysqli is not available" error
  • Quote

Post by mehargags » Tue May 17, 2016 6:29 pm

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.
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: "MySQL adapter mysqli is not available" error
  • Quote

Post by baijianpeng » Thu May 19, 2016 8:28 am

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.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: "MySQL adapter mysqli is not available" error
  • Quote

Post by mehargags » Thu May 19, 2016 7:12 pm

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.
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: "MySQL adapter mysqli is not available" error
  • Quote

Post by skamasle » Thu May 19, 2016 8:26 pm

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.
Top


Post Reply
  • Print view

5 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password