SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

70 views
Skip to first unread message

Edgar Rodríguez Silva

unread,
Oct 30, 2014, 5:33:34 AM10/30/14
to ica-ato...@googlegroups.com
Hello;

I have one problem with the task import:bulk with EAD XML.

We use this task to migrate all the data from other system to AtoM. First we have created EAD XML files with our own script, and then we use import:bulk to push them in AtoM.

This process is working very well, a little slow but effective, but we have a very large file that makes the task fails, and puts the message:

 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

We have read a lot about this error; we have increased the RAM of the server, change variables of MySQL server and tried to makes log of everything to know where is the problem, but nothing works. There was some messages with same error in this forum, but not in the same context.

In the MySQL log I have found nothing to help, there is any line from this task. I have put logs in the code of the task, but the faults occurs in one point where I have not put any log yet, because I thought that nothing critical occurs there.

I have isolated the problem in an area of the code, in lib/QubitXMLImport.php, in processMethods, it normalizes the value of first node about line 500 after the line

   $nodeValue = self::normalizeNodeValue($domNode2);

 after this it shows one of my message log and never reaches the next line 

   call_user_func_array(array( & $currentObject, $methodMap['Method']), $parameters); 

before this line I have a message log that is never shown.

The xml is very large, the method normalizeNodeValue has to normalize 300.000 p nodes, and takes about 8 hours. 

Any idea is welcome.


Best regards

Edgar Rodríguez

Jesús García Crespo

unread,
Oct 30, 2014, 11:16:03 AM10/30/14
to ica-ato...@googlegroups.com
What's the value of wait_timeout in mysqld? If it's too low you may want to increase it significantly to avoid the database to close the connection. You could also add some code in AtoM to establish the connection after a gone_away error, but that will be more difficult to accomplish.

--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/8e896b78-cc9e-46a9-b35e-f58b88624595%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jesús García Crespo

Edgar Rodríguez Silva

unread,
Oct 30, 2014, 12:05:56 PM10/30/14
to ica-ato...@googlegroups.com
Hi;

wait_timeout was 28800, but now I have put it in 57600 and I am waiting... success or failure.

Regards
Reply all
Reply to author
Forward
0 new messages