Thread: [Proxool-developer] On the number of connections in a pool during its lifetime
UNMAINTAINED!
Brought to you by:
billhorsman
From: Jean-Henry B. <ber...@ne...> - 2004-07-02 19:00:05
|
Hi, I somehow lived with the impression that once a pool is defined and started, is will go on and create connections on demand (limited by the maximum number of connections and guided by the values of prototype-count and maximum-new-connections), but if the activity in the system gets low, it will go back to the minimum number of connections (of course, after the lifetime of each connection goes of). In my latest long run tests on my system I noticed that this is not the case and rechecking the docs I realize that there's actually no direct reference to this type of behavior. Then, was my assumption wrong? If not, then I must miss something in the configuration somehow. If yes, what would be a workaround? To programatically shut down the pools and restart them from time to time? Jean |
From: Bill H. <bi...@lo...> - 2004-07-06 09:29:32
|
Jean, On Fri, 2 Jul 2004, Jean-Henry Berevoescu wrote: > I somehow lived with the impression that once a pool is defined and > started, is will go on and create connections on demand (limited by the > maximum number of connections and guided by the values of > prototype-count and maximum-new-connections), but if the activity in the > system gets low, it will go back to the minimum number of connections > (of course, after the lifetime of each connection goes of). That sounds right. > In my latest long run tests on my system I noticed that this is not the > case and rechecking the docs I realize that there's actually no direct > reference to this type of behavior. Then, was my assumption wrong? If > not, then I must miss something in the configuration somehow. If yes, > what would be a workaround? To programatically shut down the pools and > restart them from time to time? Can you send your configuration? You're absolutely right, the connection count should drop down to the minimum level after a period of inactivity. The maximum-connection-lifetime property (in milliseconds) should be killing off connections. The default is 4 hours, so after 4 hours all of your initial connections should be killed off. Then Proxool will make new ones (guided, like you say, by minimum-connection-count and prototype-count). - Bill |
From: Jean-Henry B. <ber...@ne...> - 2004-07-06 17:41:28
|
Hi, These are the parameters I use (connecting to a PostgreSQL database): proxool.maximum-connection-count 1000 proxool.minimum-connection-count 30 proxool.prototype-count 1 proxool.house-keeping-sleep-time 60000 proxool.maximum-active-time 4000 proxool.house-keeping-test-sql "select 0;" Jean bi...@lo... wrote: >Jean, > >On Fri, 2 Jul 2004, Jean-Henry Berevoescu wrote: > > > >>I somehow lived with the impression that once a pool is defined and >>started, is will go on and create connections on demand (limited by the >>maximum number of connections and guided by the values of >>prototype-count and maximum-new-connections), but if the activity in the >>system gets low, it will go back to the minimum number of connections >>(of course, after the lifetime of each connection goes of). >> >> > >That sounds right. > > > >>In my latest long run tests on my system I noticed that this is not the >>case and rechecking the docs I realize that there's actually no direct >>reference to this type of behavior. Then, was my assumption wrong? If >>not, then I must miss something in the configuration somehow. If yes, >>what would be a workaround? To programatically shut down the pools and >>restart them from time to time? >> >> > >Can you send your configuration? You're absolutely right, the connection >count should drop down to the minimum level after a period of inactivity. >The maximum-connection-lifetime property (in milliseconds) should be >killing off connections. The default is 4 hours, so after 4 hours all of >your initial connections should be killed off. Then Proxool will make new >ones (guided, like you say, by minimum-connection-count and >prototype-count). > >- Bill > > >------------------------------------------------------- >This SF.Net email sponsored by Black Hat Briefings & Training. >Attend Black Hat Briefings & Training, Las Vegas July 24-29 - >digital self defense, top technical experts, no vendor pitches, >unmatched networking opportunities. Visit www.blackhat.com >_______________________________________________ >Proxool-developer mailing list >Pro...@li... >https://lists.sourceforge.net/lists/listinfo/proxool-developer > > |
From: Bill H. <bi...@lo...> - 2004-07-07 08:13:01
|
Jean, On Tue, 6 Jul 2004, Jean-Henry Berevoescu wrote: > These are the parameters I use (connecting to a PostgreSQL database): > > proxool.maximum-connection-count 1000 > proxool.minimum-connection-count 30 > proxool.prototype-count 1 > proxool.house-keeping-sleep-time 60000 > proxool.maximum-active-time 4000 > proxool.house-keeping-test-sql "select 0;" Nothing wrong with that. I see you don't set the maximum-connection-lifetime so it will be the 4 hour default. Do you have any summarised log output? I'm expecting to see events showing that a connection had been killed because it was over 4 hours old. You could always set maximum-connection-count to something like 60000 (1 minute) to see this happening more quickly. Does the connection count ever go down? - Bill |
From: Jean-Henry B. <ber...@ne...> - 2004-07-07 14:21:29
|
I missed the maximum conn. lifetime, which I set, by default, to 14400000 (exactly 4 hours). The problem is that I see the connection cleaning after the lifetime expires not every 4 hours, but every day. I will try to set this to lower values to see what happens. Thanks, Jean bi...@lo... wrote: >Jean, > >On Tue, 6 Jul 2004, Jean-Henry Berevoescu wrote: > > > >>These are the parameters I use (connecting to a PostgreSQL database): >> >>proxool.maximum-connection-count 1000 >>proxool.minimum-connection-count 30 >>proxool.prototype-count 1 >>proxool.house-keeping-sleep-time 60000 >>proxool.maximum-active-time 4000 >>proxool.house-keeping-test-sql "select 0;" >> >> > >Nothing wrong with that. I see you don't set the >maximum-connection-lifetime so it will be the 4 hour default. > >Do you have any summarised log output? I'm expecting to see events showing >that a connection had been killed because it was over 4 hours old. You >could always set maximum-connection-count to something like 60000 (1 >minute) to see this happening more quickly. > >Does the connection count ever go down? > >- Bill > > >------------------------------------------------------- >This SF.Net email sponsored by Black Hat Briefings & Training. >Attend Black Hat Briefings & Training, Las Vegas July 24-29 - >digital self defense, top technical experts, no vendor pitches, >unmatched networking opportunities. Visit www.blackhat.com >_______________________________________________ >Proxool-developer mailing list >Pro...@li... >https://lists.sourceforge.net/lists/listinfo/proxool-developer > > |