Gnucash in "MySQL server has gone away" loop

Christopher X. Candreva chris at westnet.com
Sat Oct 1 13:36:12 EDT 2011


I've had gnucash working for a few months using a mysql database. The 
database resides on a Fedora 15 server, while gnucash runs typically runs on 
on Fedora 14 client. (However the problem below also occurs running gnucash 
on the F15 server itself).

Last night when I tried to open Gnucash, it appeared to hang on loading. 
Starting with the --debug option show that about 30 seconds after a set of 
entries like (this is the last one):

* 13:19:17  INFO <gnc.engine> [xaccTransSetDateInternal] addr=0x35c79f0 set date to 1313358140.000000000 Sun Aug 14 17:42:20 2011

Gnucash gets into a loop logging:
* 13:19:53  INFO <gnc.backend.dbi> [mysql_error_fn] DBI error: 2006: MySQL server has gone away - Reconnecting...

It's trying to reconnect about 24 times a second. The only way to stop it is 
to kill the process.  Turning on transaction logging on the SQL server shows 
the client connecting, but not issuing any commands.

On a lark, I installed mysql on the F14 client and restored the database 
there. Gnucash can open that database without problems.  I also opened a 
month-old XML save of my data, and was able to save and load that from the 
F15 server's Mysql successfully.

The F14 client has Mysql 5.1.58, while the F15 server has mysql-5.5.14-2, 
both installed from Fedora packages

I tried increasing various timeout values on the server without success. 
Here are the timeout from the F15 server (that doesn't work):
mysql > show global variables like '%timeout%';
+----------------------------+----------+
| Variable_name              | Value    |
+----------------------------+----------+
| connect_timeout            | 10       |
| delayed_insert_timeout     | 300      |
| innodb_lock_wait_timeout   | 50       |
| innodb_rollback_on_timeout | OFF      |
| interactive_timeout        | 28800    |
| lock_wait_timeout          | 31536000 |
| net_read_timeout           | 120      |
| net_write_timeout          | 60       |
| slave_net_timeout          | 3600     |
| wait_timeout               | 28800    |
+----------------------------+----------+
10 rows in set (0.00 sec)

And the F14 client (that does work):
mysql> show global variables like '%timeout%';
+----------------------------+-------+
| Variable_name              | Value |
+----------------------------+-------+
| connect_timeout            | 10    |
| delayed_insert_timeout     | 300   |
| innodb_lock_wait_timeout   | 50    |
| innodb_rollback_on_timeout | OFF   |
| interactive_timeout        | 28800 |
| net_read_timeout           | 30    |
| net_write_timeout          | 60    |
| slave_net_timeout          | 3600  |
| table_lock_wait_timeout    | 50    |
| wait_timeout               | 28800 |
+----------------------------+-------+
10 rows in set (0.00 sec)


I would appreciate any suggestions on what might be causing this and how to 
fix.


==========================================================
Chris Candreva  -- chris at westnet.com -- (914) 948-3162
WestNet Internet Services of Westchester
http://www.westnet.com/


More information about the gnucash-user mailing list