Re: [Zope] PyGres DB Connection in Zope drops when many Users are added(UserDB)(UserDB)

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Stephan Richter <srichter(at)cbu(dot)edu>
Cc: zope(at)zope(dot)org, pygresql(at)vex(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: [Zope] PyGres DB Connection in Zope drops when many Users are added(UserDB)(UserDB)
Date: 2000-04-25 11:29:49
Message-ID: 390581AD.E74DCDF0@tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Stephan Richter wrote:
>
> Hello everyone,
>
> This is a help message to every mailing list, I think this issue could be
> related to. We are in production and 5000 flyers (45000 follow) were sent
> out and the site keeps giving problems.
>
> I use:
> Zope 2.1.4, PyGres 2.x, Apache, and PostGres 7.0RC1
>
> The issue:
> It seems like that whenever "many" (10, I know that is not much) people
> sign up at the same time on our Web Site (http://www.plandepot.com) we
> loose the DB connection. The connection is simple restored, when
> disconnecting and the reconnecting the database.

And that's exactly how we quick-fixed it :)

def getUser(self, name):
"""Return the named user object or None if no such user exists"""
try: # koos elluäratamisega
try:
ob=self.sqlUserQuery(username=name)
except:
conn = getattr(self,self.conn_id)
conn.connect(conn.connection_string)
ob=self.sqlUserQuery(username=name)
except:
return None
if not ob:
return None
ob=ob[0]
return User(sqlattr(ob, 'username'),
sqlattr(ob, 'password'),
sqlattr(ob, 'roles'),
sqlattr(ob, 'domains'))

It does not find or solve the original problem, but at least it revives it
automatically

--------------
Hannu

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Richter 2000-04-25 13:02:41 Re: Is 7.0 ready? -> DBD as well???
Previous Message Thomas Good 2000-04-25 11:13:26 Re: Is 7.0 ready? -> DBD as well???