MYSQL server has gone away, Debug v1.
The current major error on PlanetPhysics is the [MYSQL server has gone away]. The user gets an internal server error, which makes the website nearly unusable. I get by using the refresh button continuously.
I've looked into the common errors associated with this on the MYSQL website, but no luck resolving it. So I've turned to the mod_perl page describing DBI connections. The first thing to check is the module and connections, so I am adding $Apache::DBI::DEBUG = 2; to the startup.pl file to start the investigation.
The first thing I notice in the log file is
[error] mod_jk child init 1 -2
after restarting apache. I must remember to look into what this means. I just realized that DEBUG=2 was already set in the Noosphere.pm. I did not get anything that looked like the mod_perl debug lines
12885 Apache::DBI need ping: yes
12885 Apache::DBI new connect to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'
12885 Apache::DBI need ping: yes
12885 Apache::DBI already connected to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'
I'm not sure why, but I'm on another trail now. In the DB.pm file for the dbConnect function I must have added at some time
$dbh->{'mysql_auto_reconnect'} = 1;
this might be a reason, I am commenting out now and restarting apache...
It did not help but after adding an entry I see a query error before getting the Mysql server has gone away error so I now believe it is this error that could start the cascade.
query failed, called from /var/www/pp/noosphere/lib/Noosphere/Requests.pm l
ine 450 (in Noosphere) at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 28
5, line 2250.
query was [SELECT uid,title FROM requests WHERE fulfilled is null ORDER BY
lower(title)] at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 286, > line 2250.
I'll test this query manually. The first thing is that the request table is empty, but why would this cause an error. Now trying the entire query. The query executes up to using lower(title). Maybe this does not work. This will need some debugging to see if lower(title) correctly works. This works so now checking call from line 450 in Requests.pm. There was no $sth->finish(). Maybe the connection isn't closed. Not sure if it matters.
Retrying the reneder and now get error:
query=INSERT INTO links VALUES (51,'objects',35,'objects')
pwd: cannot get current directory: No such file or directory
The rendering fails. Trying to rerender. It works but this is becoming a common problem. Once again this error happens before the cascade:
query failed, called from /var/www/pp/noosphere/lib/Noosphere/Requests.pm l
ine 450 (in Noosphere) at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 28
5, line 2250.
query was [SELECT uid,title FROM requests WHERE fulfilled is null ORDER BY
lower(title)] at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 286, > line 2250.
I will focus on this.
The current major error on PlanetPhysics is the [MYSQL server has gone away]. The user gets an internal server error, which makes the website nearly unusable. I get by using the refresh button continuously.
I've looked into the common errors associated with this on the MYSQL website, but no luck resolving it. So I've turned to the mod_perl page describing DBI connections. The first thing to check is the module and connections, so I am adding $Apache::DBI::DEBUG = 2; to the startup.pl file to start the investigation.
The first thing I notice in the log file is
[error] mod_jk child init 1 -2
after restarting apache. I must remember to look into what this means. I just realized that DEBUG=2 was already set in the Noosphere.pm. I did not get anything that looked like the mod_perl debug lines
12885 Apache::DBI need ping: yes
12885 Apache::DBI new connect to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'
12885 Apache::DBI need ping: yes
12885 Apache::DBI already connected to
'test::localhostPrintError=1RaiseError=0AutoCommit=1'
I'm not sure why, but I'm on another trail now. In the DB.pm file for the dbConnect function I must have added at some time
$dbh->{'mysql_auto_reconnect'} = 1;
this might be a reason, I am commenting out now and restarting apache...
It did not help but after adding an entry I see a query error before getting the Mysql server has gone away error so I now believe it is this error that could start the cascade.
query failed, called from /var/www/pp/noosphere/lib/Noosphere/Requests.pm l
ine 450 (in Noosphere) at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 28
5,
query was [SELECT uid,title FROM requests WHERE fulfilled is null ORDER BY
lower(title)] at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 286,
I'll test this query manually. The first thing is that the request table is empty, but why would this cause an error. Now trying the entire query. The query executes up to using lower(title). Maybe this does not work. This will need some debugging to see if lower(title) correctly works. This works so now checking call from line 450 in Requests.pm. There was no $sth->finish(). Maybe the connection isn't closed. Not sure if it matters.
Retrying the reneder and now get error:
query=INSERT INTO links VALUES (51,'objects',35,'objects')
pwd: cannot get current directory: No such file or directory
The rendering fails. Trying to rerender. It works but this is becoming a common problem. Once again this error happens before the cascade:
query failed, called from /var/www/pp/noosphere/lib/Noosphere/Requests.pm l
ine 450 (in Noosphere) at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 28
5,
query was [SELECT uid,title FROM requests WHERE fulfilled is null ORDER BY
lower(title)] at /var/www/pp/noosphere/lib/Noosphere/DB.pm line 286,
I will focus on this.
0 Comments:
Post a Comment
<< Home