Re: [Proxool-developer] Connection release latency when using proxool with PostgreSQL
UNMAINTAINED!
Brought to you by:
billhorsman
From: Jean-Henry B. <ber...@ne...> - 2003-12-11 10:02:42
|
I redid the tests in verbose mode and I notice that at init time I get the usual lines like: 4220 [Prototyper] DEBUG org.logicalcobwebs.proxool.globexplorer_0 - 000000 (00/24/00) - Connection #24 (719f1f) created to achieve minimum of 30 = AVAILABLE -> jdbc:postgresql://pogo:5434/gex_runtime:user=postgres;password=post.gres (185ad79) by thread Prototyper There are 30 of these (as I said the min number of conns is 30) - nothing unusual here. The weird part comes after that: when I do a server request (which usually asks for around 4 connections from proxool) no lines like these appear (which would mean, I guess, that no new connections are created by proxool) but doing netstat I notice that the number of connections is N+4 now, and the number of active ones remains N - the others are in TIME_WAIT mode and are cleaned when the sweeper kicks in. Then the question would be: what's with these additional connections I see? (in time, if I do a stress test, the number of connections raises to hundreds or even thousands, but the pattern remains: the active ones are as many as I expect and the bulk are connections in TIME_WAIT state) Thanks, Jean Bill Horsman wrote: >Hi Jean, > >On Thu, 2003-12-11 at 00:16, Jean-Henry Berevoescu wrote: > > > >>The traces are not showing anything unusual, but I noticed another >>thing: >>- I start with minumumConnectionCount set to, say, 30. Proxool is >>correctly >>building 30, but the first time I need a connection it builds another >>one, and >>another one and so on, every time a need a connection from the pool. >>So it looks like the reusability is not working. >>Again, it was working all right with Informix, but not with >>PostgreSQL. >> >> > >I'd like to see more of the log to find out what's going on there. It >should show those initial 30 connections being built. And then it will >show what happens when you ask for your first connection to use. We can >then see whether it is reusing one of those initial 30 or making a new >one. > > > >>987 [Prototyper] DEBUG org.logicalcobwebs.proxool.globexplorer_0 - >>org.postgresql.Driver does not support getHoldability. Proxool doesn't >>mind. >>988 [Prototyper] DEBUG org.logicalcobwebs.proxool.globexplorer_0 - >>org.postgresql.Driver does not support setHoldability. Proxool doesn't >>mind. >> >> >[snip] > > >>What exactly "Holdability" means? I noticed I have it with Informix, >>but not here. >> >> > >It's part of the JDBC API, but not all Drivers support it. Like the log >says, Proxool doesn't mind either way. You'll find that your Informix >driver does support it whilst your Postgresql one doesn't. > > > >>Also, how one can programatically set the connection to be readOnly? I >>always use it as readOnly in what I try to do here and I noticed >>proxool is setting it to default = false. >> >> > >Proxool is simply remembering the readOnly state of new connections. The >default state is false (that is, writable). That is how the connections >are supplied from the Postgresql Driver. Proxool resets all these states >to their original values when you return a connection to the pool. >Otherwise, if you changed something it would remain at that new value >when you asked for another connection and that might not be what you >want. So: every time you ask Proxool for a connection it comes in the >sames state as when it arrived, fresh from the Postgresql Driver. > >Regards, >Bill Horsman > > > >------------------------------------------------------- >This SF.net email is sponsored by: SF.net Giveback Program. >Does SourceForge.net help you be more productive? Does it >help you create better code? SHARE THE LOVE, and help us help >YOU! Click Here: http://sourceforge.net/donate/ >_______________________________________________ >Proxool-developer mailing list >Pro...@li... >https://lists.sourceforge.net/lists/listinfo/proxool-developer > > > |