Replying to myself here... Replacing the MySQL connection with a
postgres one doesn't fix anything - although it seems to last about
twice as long, maybe 6 seconds under constant hammering.
How would I even start debugging this?
On Tue, 2004-03-02 at 14:18, Scott Russell wrote:
> I've found a situation in which SQLobject makes webware fall over like a
> straw house...
>
> First, a very simple webware servlet:
>
> ### Start 1 ##
> from WebKit.Page import Page
> from SQLObject import *
>
> __connection__ = MySQLConnection(host="host",
> user="user",
> passwd="passwd",
> db="db")
>
> class Person(SQLObject):
> email = StringCol(length=40, default=None)
> firstname = StringCol(length=30, default=None)
> lastname = StringCol(length=30, default=None)
>
> class TestPage(Page):
> def writeContent(self):
> p = Person(1)
> self.writeln('''Welcome.''')
> ### End 1 ##
>
> I hammer and hammer and hammer, and it holds up fine - as hard as I can
> hit it, it keeps up with me.
>
> Now, a Second Servlet: (Only Changing the TestPage class - everything
> else is the same.)
>
> ### Start 2 ##
> class TestPage(Page):
> def writeContent(self):
> peeps = Person.select(Person.q.email=='xxx')
> self.writeln('''Welcome.''')
> ### End 2 ##
>
> Once again, this holds up wonderfully. It never fails, as far as I can
> tell. Rock solid.
>
> Now, for the bad one. One more TestPage servlet, this time with an
> accessor for peeps.
>
> ### Start 3 ##
> class TestPage(Page):
> def writeContent(self):
> peeps = Person.select(Person.q.email=='xxx')
> p = peeps[0]
> self.writeln('''Welcome''')
> ### End 3 ##
>
> This one functions fine, and seems to work fine until the hammering
> begins, in which case it is guaranteed to fall over within 3 seconds,
> repeatably, every time. If used at a reasonable pace, it still falls
> over, eventually. Similar tests have found select() to be the culprit -
> th emore you use it, the faster death occurs. The strangest issue? How
> it dies - I've modified Webkit to print it's exit code. Normally, it's
> 3, and that tells webkit's shell script to restart it. When it falls
> over here, it receives a 137 - which is a "kill -KILL" signal, if I'm
> correct...
>
> Can someone explain this, and hopefully show what I'm doing wrong? I'm
> actually supposed to be deploying a site reasonably soon, and can't in
> it's current state - two users kill it in just over a minute. I'll be
> in #webware on irc.freenode.net if anyone wants to compare notes.
>
> - Scott
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> sqlobject-discuss mailing list
> sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
|