[Zope] ZPsycopg - Losing Connections

2005-07-27 Thread David
Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 -  
Solaris 8 (Intel)


Hi

I am experiencing a new problem, that was not present in the past on  
the above server. From the Zope error log:


Exception Type  OperationalError
Exception ValuePQsendQuery() -- There is no connection to the  
backend.

Traceback (innermost last):

Module ZPublisher.Publish, line 92, in publish
Module ZPublisher.BaseRequest, line 433, in traverse
Module Products.exUserFolder.exUserFolder, line 869, in validate
Module Products.exUserFolder.exUserFolder, line 1133, in listOneUser
Module Products.exUserFolder.pgAuthSource.pgAuthSource, line 244, in  
listOneUser

Module Shared.DC.ZRDB.DA, line 454, in __call__
SQL instance at 922dd70
Module Products.ZPsycopgDA.db, line 228, in query
OperationalError: PQsendQuery() -- There is no connection to the  
backend.


When I check in psql, I can see a connection still being there.
Using the query:
SELECT count(pg_stat_activity.datname) AS count,  
pg_stat_activity.datname FROM pg_stat_activity GROUP BY  
pg_stat_activity.datname;

(Is this really showing active connections? Or just recent usage?)

If I use the close connection and then open connection buttons in the  
Z Psycopg Database Connection in Zope, I get the connection usually  
back. Sometimes I have to re-submit the properties to make it work,  
though.


Properties settings are:
Connect immediately is checked
Use Zope's internal DateTime module (instead of mxDateTime) is checked
Transaction isolation level:  Serializable
Backend encoding: UTF-8
Output Unicode strings is not checked

This is fast becoming a real headache for us!

What has changed? We have recently increased the max_connections and  
shared_buffers for PostgreSQL and now run more Zope instances with  
now averaging about 40 connections from the database (using the query  
above). So this is an increase.


Any help on how I can find out what's going on here is very welcome!  
(or in short: HELP, PLEASE!)


Cheers




___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Peter Bengtsson
On 7/27/05, Fernando Lujan [EMAIL PROTECTED] wrote:
 On 7/27/05, David [EMAIL PROTECTED] wrote:
  Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 -
  Solaris 8 (Intel)
 
 
 The Psycopg version 1.1.19 solves this problem. :)
 
The 1.1.19 version isn't in debian yet.
$ apt-get show python-psycopg 
shows only 1.1.18 :(


 --
 Fernando Lujan
 ___
 Zope maillist  -  Zope@zope.org
 http://mail.zope.org/mailman/listinfo/zope
 **   No cross posts or HTML encoding!  **
 (Related lists -
  http://mail.zope.org/mailman/listinfo/zope-announce
  http://mail.zope.org/mailman/listinfo/zope-dev )
 


-- 
Peter Bengtsson, 
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Fernando Lujan
On 7/27/05, Peter Bengtsson [EMAIL PROTECTED] wrote:
 On 7/27/05, Fernando Lujan [EMAIL PROTECTED] wrote:
  On 7/27/05, David [EMAIL PROTECTED] wrote:
   Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 -
   Solaris 8 (Intel)
  The Psycopg version 1.1.19 solves this problem. :)
 The 1.1.19 version isn't in debian yet.
 $ apt-get show python-psycopg
 shows only 1.1.18 :(

So, use the source... ;)

-- 
Fernando Lujan
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Thomas Olsen
On Wednesday den 27. July 2005 14:45, Peter Bengtsson wrote:
 On 7/27/05, Fernando Lujan [EMAIL PROTECTED] wrote:
  On 7/27/05, David [EMAIL PROTECTED] wrote:
   Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 -
   Solaris 8 (Intel)
 
  The Psycopg version 1.1.19 solves this problem. :)

 The 1.1.19 version isn't in debian yet.
 $ apt-get show python-psycopg
 shows only 1.1.18 :(

#wget 
http://ftp.de.debian.org/debian/pool/main/p/psycopg/python-psycopg_1.1.19-1_i386.deb
#dpkg -i python-psycopg_1.1.19-1_i386.deb

-- 
Med venlig hilsen

Thomas Olsen
http://www.headnet.dk
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] ZPsycopg - Losing Connections

2005-07-27 Thread Felipe Barousse Boue
Fernando:

I have downloaded the source from 

   http://initd.org/pub/software/psycopg/PSYCOPG-1-1/

and compiled it (in RH FC4 and RHEL3, tough)  with no problams
whatsoever. 

I am using Zope 2.7.5, Python 2.3.5, Psycopg sources 1.1.19 and
PostgreSQL 8.0.3 

The only advice would be to upgrade your postgresql to 8.0.3 since the
version you are using is a bit outdated.

Best regards.

Felipe Barousse Boué
Piensa Technologies - Bufete Consultor de Mexico
www.piensa.com

On Wed, 2005-07-27 at 12:00 -0400, [EMAIL PROTECTED] wrote:
 Message: 15
 Date: Wed, 27 Jul 2005 13:45:52 +0100
 From: Peter Bengtsson [EMAIL PROTECTED]
 Subject: Re: [Zope] ZPsycopg - Losing Connections
 To: Fernando Lujan [EMAIL PROTECTED]
 Cc: zope@zope.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=ISO-8859-1
 
 On 7/27/05, Fernando Lujan [EMAIL PROTECTED] wrote:
  On 7/27/05, David [EMAIL PROTECTED] wrote:
   Python 2.3.5 - Zope 2.7.5 - PostgreSQL 7.3.4 - Psycopg 1.1.18 -
   Solaris 8 (Intel)
  
  
  The Psycopg version 1.1.19 solves this problem. :)
  
 The 1.1.19 version isn't in debian yet.
 $ apt-get show python-psycopg 
 shows only 1.1.18 :(

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )