You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Zamek <za...@vili.pmmf.hu> on 2003/03/18 22:31:59 UTC

Turbine doesn't close database connection

Hi All,

I am using postgresql in Debian Linux 3.0 (unstable) with :
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20010925 (JIT enabled: 
jitc))

When a user session closed (after 30 min) turbine doesn't close opened 
postgres connection:
zamek@zen:~$ ps aux | grep post
postgres 32474  0.0  0.4 16068 2180 ?        S    Mar15   0:00 
/usr/lib/postgresql/bin/postmaster
postgres 32475  0.0  0.4 17060 2160 ?        S    Mar15   0:00 postgres: 
stats buffer process
postgres 32478  0.0  0.4 16116 2208 ?        S    Mar15   0:00 postgres: 
stats collector process
postgres 32486  0.0  0.9 16932 4928 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres 32507  0.0  0.8 16908 4380 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres 32555  0.0  0.9 16968 4648 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres 32576  0.0  0.7 16808 3992 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres 32666  0.0  0.9 16940 4764 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres   708  0.0  0.8 16816 4188 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres   709  0.0  0.9 16932 4640 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres   710  0.0  0.8 16908 4308 ?        S    Mar15   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  2052  0.0  0.8 16840 4256 ?        S    Mar16   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  5925  0.0  0.9 16940 4804 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  5926  0.0  0.8 16908 4364 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  6162  0.0  0.9 16932 4700 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  6163  0.0  0.7 16816 4084 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  6269  0.0  0.8 16816 4188 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  6604  0.0  0.8 16816 4184 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle
postgres  6605  0.0  0.8 16932 4596 ?        S    Mar18   0:00 postgres: 
postgres vili 127.0.0.1 idle

ther are _very_ old connections in idle status. 
What do I have to do to close unecessary connections?
Are there any special porperties in TR.properties or Torque.properties?

-- 
thx,
----------------------------------------------------
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine doesn't close database connection

Posted by Zamek <za...@vili.pmmf.hu>.
Hello,

Henning P. Schmiedehausen wrote:

>Zamek <za...@vili.pmmf.hu> writes:
>
>  
>
>>##torque.dsfactory.vili.pool.maxExpiryTime=3600
>>    
>>
>
>You have had a timeout of one hour with the old pool. So you might see
>connections linger for that long.
>  
>

Yes, its true, but there was more than 3 days older connections in idle 
state!
I am testing jdbc2 pool to solve it.

-- 
thx,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine doesn't close database connection

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Zamek <za...@vili.pmmf.hu> writes:

>##torque.dsfactory.vili.pool.maxExpiryTime=3600

You have had a timeout of one hour with the old pool. So you might see
connections linger for that long.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine doesn't close database connection

Posted by Zamek <za...@vili.pmmf.hu>.
Hello,

Henning P. Schmiedehausen wrote:

>>I am using postgresql in Debian Linux 3.0 (unstable) with :
>>java version "1.3.0"
>>Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
>>Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20010925 (JIT enabled: 
>>jitc))
>>    
>>
>
>Please tell us what Turbine / Torque version you're using. Did you 
>copy old(er) Torque configuration? 
>
Turbine 2.2.1. / torque-3.0.jar

## Using torque's old pool
##torque.dsfactory.vili.factory=org.apache.torque.dsfactory.TorqueDataSourceFactory
##torque.dsfactory.vili.pool.defaultMaxConnections=10
##torque.dsfactory.vili.pool.maxExpiryTime=3600
##torque.dsfactory.vili.pool.connectionWaitTimeout=10
##torque.dsfactory.vili.connection.driver = org.postgresql.Driver
##torque.dsfactory.vili.connection.url = jdbc:postgresql:vili
##torque.dsfactory.vili.connection.user = postgres
##torque.dsfactory.vili.connection.password =

## Using Jdbc2Pool
torque.dsfactory.vili.factory=\
  org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.vili.pool.defaultMaxActive=10
torque.dsfactory.vili.pool.testOnBorrow=true
torque.dsfactory.vili.pool.validationQuery=SELECT 1
torque.dsfactory.vili.connection.driver = org.postgresql.Driver
torque.dsfactory.vili.connection.url = jdbc:postgresql:vili
torque.dsfactory.vili.connection.user = postgres
torque.dsfactory.vili.connection.password =

Now I change to to jdbc pool from old pool (based Quinton McCombs's 
suggestion ), and testing it.

>However, the torque-users list might be a better place to ask for this.
>  
>
So, it maybe true, but I send a message to torque list at last saturday, 
and nobody replies. 

-- 
thx,
Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Turbine doesn't close database connection

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Zamek <za...@vili.pmmf.hu> writes:

>Hi All,

>I am using postgresql in Debian Linux 3.0 (unstable) with :
>java version "1.3.0"
>Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
>Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20010925 (JIT enabled: 
>jitc))

Please tell us what Turbine / Torque version you're using. Did you 
copy old(er) Torque configuration? I got bitten by the fact that at one
point the timeouts did change from millis to seconds. So you might see
really huge timeouts because the should've been divided by 1000.

However, the torque-users list might be a better place to ask for this.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org