Russ Brown wrote:
> Not long back I switched from the prefork apache MPM to the worker one,
> at the suggestion of coderanger (due to better memory efficiency etc). I
> set it up to run on two processes each spawning a number of threads.
> 
> Yesterday we encountered Trac being unable to connect to the database
> (Postgres 8.2, Trac 0.11 RC2), and when investigating it noticed that
> trac only had two connections open (two large requests were being
> processed at this time leading to the site being unavailable to other
> requests).

Did you get a "Unable to get database connection within 20 
seconds"-error or something else?

The exact traceback would also be interesting.

> I asked about this in IRC and was told that there were issues with the
> pooling in RC2 and that I should upgrade to 0.11. coderanger also
> mentioned the TRAC_DB_POOL_SIZE environment variable which could be used
> to control the connection pooling.

The connection currently in 0.11 is limited to 5 connections per 
environment per apache process. So as far as I can tell you should be 
able to get up to 10 concurrent requests with your setup, and certainly 
more than 2.

> I did that, but Trac still only held two connections open. I viewed
> trac/db/pool.py and saw no mention of TRAC_DB_POOL_SIZE. Looking at the
> file on trunk (of t.e.o) I do see it there, which suggests that
> TRAC_DB_POOL_SIZE was actually added post 0.11. I also don't see it in
> that file on the 0.11-stable branch.
> 
> Is there any estimate as to when this change might be released (e.g.
> 0.11.1)?

Yes, it's planned for 0.11.1. If you want to test it now all you need to 
do is to download and replace pool.py from trunk:

http://svn.edgewall.org/repos/trac/branches/0.11-stable/trac/db/pool.py

/ Jonas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to