Re: [Zope] urgent stability problem on production site
"Matthew T. Kromer" <matt@zope.com> writes:
Frank, try starting Zope up single-threaded ( -t 1 ) and see if that helps; I'm nervous about a potential problem with the MySQLDA C libraries having thread-local data and switching threads leading to instability.
I have set this - now Zope doesn't want to die :) I will have to wait for the next error to see the effect.
We've had one customer who 'made the problems go away' when they ran single-threaded Zope.
Interesting - aren't the MySQL connections bound to a thread? YOu mean there may be a bug at a lower level than mysql-python? Regards, Frank -- CTO fte@Lightwerk.com http://www.Lightwerk.com/ Fax: +49-2434-80 07 94 Phone: +49-2434-80 07 81 Lightwerk GmbH * An der Kull 11 * 41844 Wegberg * Germany Besuchen Sie uns auf der CeBIT: Halle 6, Stand F68 / 595
Frank Tegtmeyer wrote:
"Matthew T. Kromer" <matt@zope.com> writes:
Frank, try starting Zope up single-threaded ( -t 1 ) and see if that helps; I'm nervous about a potential problem with the MySQLDA C libraries having thread-local data and switching threads leading to instability.
I have set this - now Zope doesn't want to die :) I will have to wait for the next error to see the effect.
We've had one customer who 'made the problems go away' when they ran single-threaded Zope.
Interesting - aren't the MySQL connections bound to a thread? YOu mean there may be a bug at a lower level than mysql-python?
Regards, Frank
Well, I'm worried about the MySQL libraries. You can build them either in threaded or nonthreaded mode; and the default setup of ZMySQLDA was to use the nonthreaded libraries. So that's a problem right there. Secondly, Andy Dustman thought that certain library objects were thread-bound -- so you couldn't allocate a connection object on one thread and then invoke it from another. Zope would try to do that as part of the DA connection pooling. I have a patch for ZMySQLDA which tries to close and reopen the MySQL connection when the DA connection object switches threads, but I haven't ever heard from someone "this fixes it!" I personally haven't got a reproducable test case in house to try to diagnose the MySQL problems. When I do simple queries etc by banging on the Zope SQL Methods with "ab" I don't have MySQL fail.
On Wed, 2002-01-30 at 13:17, Matthew T. Kromer wrote:
Well, I'm worried about the MySQL libraries. You can build them either in threaded or nonthreaded mode; and the default setup of ZMySQLDA was to use the nonthreaded libraries. So that's a problem right there.
0.9.2a2 uses threaded by default now.
Secondly, Andy Dustman thought that certain library objects were thread-bound -- so you couldn't allocate a connection object on one thread and then invoke it from another. Zope would try to do that as part of the DA connection pooling. I have a patch for ZMySQLDA which tries to close and reopen the MySQL connection when the DA connection object switches threads, but I haven't ever heard from someone "this fixes it!"
I have a better patch now, which locks the connection object during queries (or transactions, if transactional). If there's more than one connection object being created by Zope, so much the better. The customer you mentioned earlier has been using it for about a week, in multi-threaded mode last I heard... I will commit the changes to CVS sometime today and post an announcement...
I personally haven't got a reproducable test case in house to try to diagnose the MySQL problems. When I do simple queries etc by banging on the Zope SQL Methods with "ab" I don't have MySQL fail.
Me neither. -- Andy Dustman PGP: 0x930B8AB6 @ .net http://dustman.net/andy You can have my keys when you pry them from my dead, cold neurons.
My Stupid error log contains the following error message : ====================================================== 2002-02-10T10:50:23 ERROR(200) zdaemon zdaemon: Sun Feb 10 18:50:23 2002: Aiieee ! 24091 exited with error code: 11 ------ 2002-02-10T10:50:23 INFO(0) zdaemon zdaemon: Sun Feb 10 18:50:23 2002: Houston, we have forked ------ 2002-02-10T10:50:23 INFO(0) zdaemon zdaemon: Sun Feb 10 18:50:23 2002: Hi, I jus t forked off a kid: 24118 ------ 2002-02-10T10:50:23 INFO(0) zdaemon zdaemon: Sun Feb 10 18:50:23 2002: Houston, we have forked ====================================================== Does anyone can give me a hand on how to figure out what does "error code:11" mean? Thanks a lot. Iap, Singuan
iap@y2fun.com wrote:
Does anyone can give me a hand on how to figure out what does "error code:11" mean?
The one has been prettymuch done to death, search the mailing list archives. hint: What version of Zope are you using? What version of Python? cheers, Chris
participants (5)
-
Andy Dustman -
Chris Withers -
Frank Tegtmeyer -
iap@y2fun.com -
Matthew T. Kromer