[SOLVED] mysql has gone away

Moderator: crythias

Locked
shaitand
Znuny newbie
Posts: 35
Joined: 09 Sep 2011, 23:17
Znuny Version: 3.0.10

[SOLVED] mysql has gone away

Post by shaitand »

After upgrade from 3.0 to 3.1 I'm getting this error and otrs stops responding until I restart apache. It seems to occur when activity is low during the day when we have high levels of activity the system stays up. When activity levels drop on the evening and night shift the system goes down every 30mins to 3hrs.

max_allowed_packet, wait_timeout, and connect_timeout are all set to high values (512MB, the max 3mil or something seconds, 300 seconds).

It also occurs when pointing to a different database replica with mysql defaults for these settings (except max_allowed_packet which is increased on all our systems). A different server running the same version is able to point to the same database and has no issues since upgrade. They are running the same OS and the same config, the only difference is the first box performed the upgrade against a local import of the database. I've since completely overwritten the local otrs home directory with the copy from that server and still see this error on only this system with both pointed at the same database server.

This error actually occurred during the upgrade migration script as well. After a long process such as converting the fields on tickets (several hours) it would complete and then give this when trying to execute the next command. In order to complete the upgrade I had to comment out each completed step and restart the script.

Why doesn't it auto reconnect? Why does an otrs reload not fix the problem instead it requires a full apache restart?
Last edited by shaitand on 14 Jun 2012, 20:59, edited 1 time in total.
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: mysql has gone away

Post by CSL »

This definitely sounds like a wait_timeout issue. You have 2 MySQL installs - one with default wait_timeout, and one with a set wait_timeout. You have 2 servers running two different instances of apache.

When you use one server (otrs box) to connect to either DB, then you get the same issue of timeouts occuring. When you use the other server you have no issues.

I may be wrong, but I think the otrs apache server could be setting its own timeout variables for its sessions, while the other server's apache is not. Try swapping config files between them to see if you can get the issue to move between the two servers, or using know-good config files on the otrs box to see if the issue goes away.

There is also the matter of mod_perl and it's configuration, if you are using it, or FastCGI.

I know you've said they have the same config, but in the past I've thought this as well and eventually found the issue to be a difference that found its way in, so it's worth checking this and assuming there may be differences.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
shaitand
Znuny newbie
Posts: 35
Joined: 09 Sep 2011, 23:17
Znuny Version: 3.0.10

Re: mysql has gone away

Post by shaitand »

Thank you for the help.

I finally traced the issue down to mod_perl. It was installed on both boxes but disabled on the server that works. Disabling it "resolved" the issue on the other server but I will have to trace down the culprit that is breaking mod_perl eventually.
Locked