Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

Problem with Zodb connections pool

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


c.battaglino at metaware

Oct 14, 2009, 3:26 AM

Post #1 of 3 (1334 views)
Permalink
Problem with Zodb connections pool

Hi all,
I've a system with Zope 2.8.8 that since some weeks is very slow.
The python process keeps busy the CPU (98-99%) and the memory used by
the process is growing up.
Every day a script makes a pack of the ZODB and restarts Zope so the
Data.fs size is stable (about 350MB).

In the event.log I can see many of this warnings:
2009-10-14T11:59:14 WARNING ZODB.DB DB.open() has 8 open connections
with a pool_size of 7

What does it mean?

I can see also some of these messages:
2009-10-14T12:14:16 INFO ZODB.Conflict database conflict error...

According to you, are the two messages related?

Thank you very much

claudio





_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


tseaver at palladion

Oct 14, 2009, 3:51 AM

Post #2 of 3 (1223 views)
Permalink
Re: Problem with Zodb connections pool [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Claudio Battaglino wrote:
> Hi all,
> I've a system with Zope 2.8.8 that since some weeks is very slow.
> The python process keeps busy the CPU (98-99%) and the memory used by
> the process is growing up.
> Every day a script makes a pack of the ZODB and restarts Zope so the
> Data.fs size is stable (about 350MB).
>
> In the event.log I can see many of this warnings:
> 2009-10-14T11:59:14 WARNING ZODB.DB DB.open() has 8 open connections
> with a pool_size of 7
>
> What does it mean?

Likely something in your application is leaking connections (and
therefore RAM). Normally each "worker" thread gets a connection from
the pool at the start of the request, uses it, and then returns it to
the pool at the end of the request.

If you are using the default configuration for number of threads (4),
then something has leaked four connections (assuming your server is busy
at the time you see that log message). You should examine the "Debug
Information" page in the ZMI control panel to get information for
diagnosing the leak.

> I can see also some of these messages:
> 2009-10-14T12:14:16 INFO ZODB.Conflict database conflict error...
>
> According to you, are the two messages related?

No. Conflict errors occur normally, whenever "simultaneous" requests
cause writes to the same objects. The request whose transaction commits
"later" gets retried, up to three times; if it still conflicts, then
the request returns an error, and you see the message in your logfile.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver [at] palladion
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkrVrT4ACgkQ+gerLs4ltQ5HagCeJ1X32zT+LOMasY90fzmBolzR
Q6MAn3qHhkjENxxr7B24z54fsj4TCfQT
=ETsW
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


peterbe at gmail

Oct 14, 2009, 4:00 AM

Post #3 of 3 (1231 views)
Permalink
Re: Problem with Zodb connections pool [In reply to]

2009/10/14 Tres Seaver <tseaver [at] palladion>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Claudio Battaglino wrote:
>> Hi all,
>> I've a system with Zope 2.8.8 that since some weeks is very slow.
>> The python process keeps busy the CPU (98-99%) and the memory used by
>> the process is growing up.
>> Every day a script makes a pack of the ZODB and restarts Zope so the
>> Data.fs size is stable (about 350MB).
>>
>> In the event.log I can see many of this warnings:
>> 2009-10-14T11:59:14 WARNING ZODB.DB DB.open() has 8 open connections
>> with a pool_size of 7
>>
>> What does it mean?
>
> Likely something in your application is leaking connections (and
> therefore RAM).  Normally each "worker" thread gets a connection from
> the pool at the start of the request, uses it, and then returns it to
> the pool at the end of the request.
>
> If you are using the default configuration for number of threads (4),
> then something has leaked four connections (assuming your server is busy
> at the time you see that log message).  You should examine the "Debug
> Information" page in the ZMI control panel to get information for
> diagnosing the leak.
>

Tres is right. Use the Debug Information. Especially look for requests
(the last big table) that take longer than 1 second.
The table will provide some information about what request is taking so long.
Additionally/Alternatively you can check out DeadlockDebugger which
you have to install manually for your Zope and you get the same
information but instead of information about the requests you get
tracebacks from within the code that is executing the requests.


>> I can see also some of these messages:
>> 2009-10-14T12:14:16 INFO ZODB.Conflict database conflict error...
>>
>> According to you, are the two messages related?
>
> No.  Conflict errors occur normally, whenever "simultaneous" requests
> cause writes to the same objects.  The request whose transaction commits
> "later" gets retried, up to three times;  if it still conflicts, then
> the request returns an error, and you see the message in your logfile.
>
>
> Tres.
> - --
> ===================================================================
> Tres Seaver          +1 540-429-0999          tseaver [at] palladion
> Palladion Software   "Excellence by Design"    http://palladion.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkrVrT4ACgkQ+gerLs4ltQ5HagCeJ1X32zT+LOMasY90fzmBolzR
> Q6MAn3qHhkjENxxr7B24z54fsj4TCfQT
> =ETsW
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Zope maillist  -  Zope [at] zope
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope-dev )
>



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
fun crosstips.org
_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.