Re: [ZODB-Dev] weird MySQL gone away error when viewing history tab on Script(Python) with RelStorage 1.4.2

2011-05-03 Thread Chris Withers
On 27/04/2011 18:11, Shane Hathaway wrote:
 OperationalError: (2006, 'MySQL server has gone away')

 This is happening across at least two separate instances with separate
 storages.

 Any ideas?

 Maybe the query is killing MySQL, for whatever reason.

I don't think so, since I'd then expect all the other storages served by 
that cluster to complain similarly.
However, it's literally just the thread handling this particular request 
that shows the error...

 Are the MySQL
 process IDs the same before and after this happens?

Yes.

Nothing in the logs either...

Ideas gratefully received!

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] weird MySQL gone away error when viewing history tab on Script(Python) with RelStorage 1.4.2

2011-05-03 Thread Shane Hathaway
On 05/03/2011 01:39 AM, Chris Withers wrote:
 On 27/04/2011 18:11, Shane Hathaway wrote:
 OperationalError: (2006, 'MySQL server has gone away')

 This is happening across at least two separate instances with separate
 storages.

 Any ideas?

 Maybe the query is killing MySQL, for whatever reason.

 I don't think so, since I'd then expect all the other storages served by
 that cluster to complain similarly.

Not necessarily.  RelStorage reconnects automatically.  The reconnection 
is invisible unless the disconnect happens in the middle of a request, 
in which case RelStorage raises the error then automatically reconnects 
on the next request.

 However, it's literally just the thread handling this particular request
 that shows the error...

Two ideas:

- MySQL is dropping the connection after a long period of inactivity, 
then RelStorage doesn't notice it's dropped until it's too late. 
Connections that poll take defensive steps to prevent that, but maybe 
you're using a connection that does not poll.

- A single MySQL thread is dying.  (Is MySQL multithreaded?)

Shane
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] weird MySQL gone away error when viewing history tab on Script(Python) with RelStorage 1.4.2

2011-05-03 Thread Chris Withers
On 03/05/2011 09:02, Shane Hathaway wrote:
 Maybe the query is killing MySQL, for whatever reason.

 I don't think so, since I'd then expect all the other storages served by
 that cluster to complain similarly.

 Not necessarily. RelStorage reconnects automatically.

...but logs, and I haven't seen any log entries for this. Even for the 
thread which showed this error, which is weird...

 The reconnection
 is invisible unless the disconnect happens in the middle of a request,
 in which case RelStorage raises the error then automatically reconnects
 on the next request.

...or maybe not so weird.

 However, it's literally just the thread handling this particular request
 that shows the error...

 Two ideas:

 - MySQL is dropping the connection after a long period of inactivity,
 then RelStorage doesn't notice it's dropped until it's too late.

Don't think so, this is 100% reproducible, even after the Zope instance 
has just been restarted...

 Connections that poll take defensive steps to prevent that, but maybe
 you're using a connection that does not poll.

I'm using whatever the default that you've specified is ;-)

 - A single MySQL thread is dying. (Is MySQL multithreaded?)

MySQL does indeed appear to be multithreaded, but I've seen no hard 
evidence of thread death, although it's hard to spot...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] weird MySQL gone away error when viewing history tab on Script(Python) with RelStorage 1.4.2

2011-04-27 Thread Chris Withers
Hi Shane,

Attempting to view the /manage_change_history_page of a history-keeping 
relstorage is giving me:

script statement failed: '\nSELECT 1 FROM current_object WHERE 
zoid = %(oid)s\n'; parameters: {'oid': 1163686}

...and then:

Traceback (innermost last):
   Module ZPublisher.Publish, line 127, in publish
   Module ZPublisher.mapply, line 77, in mapply
   Module ZPublisher.Publish, line 47, in call_object
   Module Shared.DC.Scripts.Bindings, line 324, in __call__
   Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
   Module App.special_dtml, line 185, in _exec
   Module OFS.History, line 120, in manage_change_history
   Module relstorage.storage, line 1011, in history
   Module relstorage.adapters.dbiter, line 120, in iter_object_history
   Module relstorage.adapters.scriptrunner, line 53, in run_script_stmt
   Module MySQLdb.cursors, line 174, in execute
   Module MySQLdb.connections, line 36, in defaulterrorhandler
OperationalError: (2006, 'MySQL server has gone away')

This is happening across at least two separate instances with separate 
storages.

Any ideas?

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing  Python Consulting
- http://www.simplistix.co.uk
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] weird MySQL gone away error when viewing history tab on Script(Python) with RelStorage 1.4.2

2011-04-27 Thread Shane Hathaway
On 04/27/2011 05:07 AM, Chris Withers wrote:
 Hi Shane,

 Attempting to view the /manage_change_history_page of a history-keeping
 relstorage is giving me:

 script statement failed: '\nSELECT 1 FROM current_object WHERE
 zoid = %(oid)s\n'; parameters: {'oid': 1163686}

 ...and then:

 Traceback (innermost last):
 Module ZPublisher.Publish, line 127, in publish
 Module ZPublisher.mapply, line 77, in mapply
 Module ZPublisher.Publish, line 47, in call_object
 Module Shared.DC.Scripts.Bindings, line 324, in __call__
 Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
 Module App.special_dtml, line 185, in _exec
 Module OFS.History, line 120, in manage_change_history
 Module relstorage.storage, line 1011, in history
 Module relstorage.adapters.dbiter, line 120, in iter_object_history
 Module relstorage.adapters.scriptrunner, line 53, in run_script_stmt
 Module MySQLdb.cursors, line 174, in execute
 Module MySQLdb.connections, line 36, in defaulterrorhandler
 OperationalError: (2006, 'MySQL server has gone away')

 This is happening across at least two separate instances with separate
 storages.

 Any ideas?

Maybe the query is killing MySQL, for whatever reason.  Are the MySQL 
process IDs the same before and after this happens?

Shane
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zodb-dev