• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Everytime stats are run, /var partition goes under read only mode

SalvadorS

Regular Pleskian
Hello,

I have to disable statistics on plesk because everytime this command was run /var partition goes into read mode only and I have to reboot the server.

I disable all statistics and try to run script.php manually:

/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php

And this is the error:

ns1:/usr/local/psa/admin/sbin# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php
statistics: Mysql server has gone away. Trying to reconnect
statistics: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
System error 111: Connection refused
statistics: Unable to reconnect to the mysql database

System error 111: Connection refused
[Thu, 17 Dec 2009 12:48:30 +0100] ! 1 Error: Execution failed: statistics: Mysql server has gone away. Trying to reconnect
statistics: Unable to connect to Plesk Database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
System error 111: Connection refused
statistics: Unable to reconnect to the mysql database

System error 111: Connection refused
[Thu, 17 Dec 2009 12:48:30 +0100] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Thu, 17 Dec 2009 12:48:30 +0100] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Thu, 17 Dec 2009 12:48:30 +0100] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Thu, 17 Dec 2009 12:48:30 +0100] ! 1 Error: Execution failed: Empty error message from utility.
PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0

Any ideas?
 
Looks like mysql is not started there. What status of mysql server before starting mentioned command?
 
MySQL was up and running without any problem. Everytime we run /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php we have the same problem (/var partition goes under read only status and we have to reboot the server) so we disable this script from the crontab.

Regards
 
If I correctly understood you have separate partition for /var? I can assume that hardware related problems can be a reason of this issue. Do you have any filesystem related errors in /var/log/messages when /var became read-only?
 
Hello,

Yes /var is a separate partition.

These are the filesystem related errors in /var/log/messages:

Dec 15 12:54:35 ns1 gconfd (root-14978): comenzando (version 2.16.1), pid 14978 usuario «root»
Dec 15 12:54:36 ns1 gconfd (root-14978): Se resolvio la direccion «xml:readonly:/etc/gconf/gconf.xml.mandatory» a una fuente de iguracion de solo lectura en la posicion 0
Dec 15 12:54:36 ns1 gconfd (root-14978): Se resolvio la direccion «xml:readwrite:/root/.gconf» a una fuente de configuracion estable en la posicion 1
Dec 15 12:54:36 ns1 gconfd (root-14978): Se resolvio la direccion «xml:readonly:/etc/gconf/gconf.xml.defaults» a una fuente de cguracion de solo lectura en la posicion 2
Dec 15 12:54:37 ns1 gconfd (root-14978): Se resolvio la direccion «xml:readonly:/var/lib/gconf/debian.defaults» a una fuente de iguracion de solo lectura en la posicion 3
Dec 15 12:54:37 ns1 gconfd (root-14978): Se resolvio la direccion «xml:readonly:/var/lib/gconf/defaults» a una fuente de configuon de solo lectura en la posicion 4
 
I'm not familiar with this language, but seems it is not filesystem related errors but gconf related. Do you really have mountpoint in /etc/fstab for /var with rw permission? Do you really can't write on /var when you see messages about read-only?
 
I have the same problem too

I have the same problem too

root@sss:/etc# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php
error: error accessing /usr/share/tomcat5.5/logs: No such file or directory
error: tomcat:2 glob failed for /usr/share/tomcat5.5/logs/*.log
[Sun, 04 Apr 2010 12:13:43 +0400] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Sun, 04 Apr 2010 12:13:43 +0400] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Sun, 04 Apr 2010 12:13:43 +0400] ! 0 Error: Unable to connect to database: MySQL server has gone away
PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0

Mysql is UP
And I don't use tomcat5.5 (my license do not support it)

Ubuntu Server 8.04 LTS
 
For preventing error "MySQL server has gone away" try to increase wait_timeout in /etc/my.cnf:

wait_timeout 20000

Restart MySQL after that.
 
For preventing error "MySQL server has gone away" try to increase wait_timeout in /etc/my.cnf:

wait_timeout 20000

Restart MySQL after that.

This param already = 36000 since 2009 year )))
 
if domain have no hosting

/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php
show errors:

error: error accessing /var/www/vhosts/DOMAIN.COM/statistics/logs: No such file or directory
error: DOMAIN.COM:1 glob failed for /var/www/vhosts/DOMAIN.COM/statistics/logs/*.processed

but hosting for this domain is disabled and folders dose not exists and it's normal, why script.php think that is error...

this error:
[Sun, 04 Apr 2010 12:13:43 +0400] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Sun, 04 Apr 2010 12:13:43 +0400] ! 0 Error: Unable to connect to database: MySQL server has gone away
[Sun, 04 Apr 2010 12:13:43 +0400] ! 0 Error: Unable to connect to database: MySQL server has gone away
I resolve this problem.
In my case it happens because of disappear some IP on my eth0 (thnx my ISP) and become a red state in panel.
I delete all red state IPs and retry IP list.

All is ok now.

But I have a new question.
How I can change main ip? It is show in dashboard below host name.
When I have this problem this ip in red state IPs list.
 
Back
Top