Control Web Panel
WebPanel => MySQL => Topic started by: fa46 on April 14, 2017, 11:18:58 AM
-
When loading, mysql drops and gives an error
Warning: [obfuscated](): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Warning: [obfuscated](): (HY000/2002): Connection refused in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Trying to start mysql server, please wait!
Try to restart CentOS Web Panel with command: service cwpsrv restart
**Check your MySQL root password in: /usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php and /root/.my.cnf
Warning: [obfuscated]() expects exactly 1 parameter, 0 given in /usr/local/cwpsrv/htdocs/admin/admin/index.php on line 0
Could not connect:
-
you should check your mysql server logs in /var/lib/mysql/
-
I got these errors
Sat Apr 15 09:36:22.827571 2017] [:error] [pid 2056:tid 140028550313728] [client 46.183.165.7:37010] thrown in /home/fa461/public_html/includes/database/database.inc on line 2227
[Sat Apr 15 09:36:22.838341 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in /home/fa461/public_html/includes/database/database.inc:2227
[Sat Apr 15 09:36:22.838376 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] Stack trace:
[Sat Apr 15 09:36:22.838393 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #0 /home/fa461/public_html/includes/database/database.inc(2227): PDOStatement->execute(Array)
[Sat Apr 15 09:36:22.838411 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #1 /home/fa461/public_html/includes/database/database.inc(697): DatabaseStatementBase->execute(Array, Array)
[Sat Apr 15 09:36:22.838433 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #2 /home/fa461/public_html/includes/database/database.inc(2406): DatabaseConnection->query('SELECT expire, ...', Array, Array)
[Sat Apr 15 09:36:22.838458 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #3 /home/fa461/public_html/includes/lock.inc(167): db_query('SELECT expire, ...', Array)
[Sat Apr 15 09:36:22.838485 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #4 /home/fa461/public_html/includes/lock.inc(146): lock_may_be_available('theme_registry:...')
[Sat Apr 15 09:36:22.838501 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #5 /home/fa461/public_html/includes/theme.inc(449): lock_acquire('theme_registry:...')
[Sat Apr 15 09:36:22.838515 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #6 /home/fa461/public_html/includes/bootstrap.inc(455): ThemeRegistry->set(Array)
[Sat Apr 15 09:36:22.838525 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #7 [internal function]: DrupalCacheArray->__destruct()
[Sat Apr 15 09:36:22.838527 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] #8 {main}1
[Sat Apr 15 09:36:22.838542 2017] [:error] [pid 819:tid 140028432815872] [client 46.183.165.9:60712] thrown in /home/fa461/public_html/includes/database/database.inc on line 2227
-
I am in the same problem.
Happens almost everyday, affeted: website "database error". Running well after login webpanel GUI.
Also happens every reboot server.
Any solution?
-
I am in the same problem.
-
at very beginning of this error your 2006 Mysql server has gone away error indication of time out. you can set
max_allowed_packet to higher value such as 100M in your mysql configuration and see if this will sort the problem .
-
The solution is simple "just upgrade our server with bigger ram", supposed to be "2 GB or higher".
-
I guess two reasons:
- Your app has problem, try to check it
- your server's spec is too low (under 1 GB RAM, not recommended)
If you are unable to upgrade your server, maybe try to extend swap memory
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7
Note: I have tested, only work on KVM, does not work on openVZ