Thread view

Hi,
I just started using proxool and here is the scenario.
I am using the connection object within the endless loops. It actually exists in run() method of a thread that implements Runnable interface.
In the debug statement, it shows the following msg:
--------
302265 [HouseKeeper] WARN proxool.smsc - #0001 was active for 301343 milliseconds and has been removed automaticaly. The Thread responsible was named 'AWT-EventQueue-0'.
-------
327271 [HouseKeeper] WARN proxool.smsService - #0001 was active for 304328 milliseconds and has been removed automaticaly. The Thread responsible was named 'Thread-3'.
-------
360639 [HouseKeeper] WARN proxool.smsc - #0002 was active for 337676 milliseconds and has been removed automaticaly. The Thread responsible was named 'Thread-3'.
-------
here is the properties that I set:
info.setProperty("proxool.maximum-connection-count", "30");
info.setProperty("proxool.house-keeping-test-sql", "select CURRENT_DATE");
info.setProperty("house-keeping-sleeping-time", "15000");
info.setProperty("test-before-use", "true");
info.setProperty("test-after-use", "true");
ProxoolFacade.registerConnectionPool(url, info);
I am using SQL Server 2000 with Microsoft JDBC Driver.
Please. appreciate your help on this one. I am really confused.
Regards,
Milliblast
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

The log says you have a JDBC connection active since 300000ms which is
higher than the maximum allowed by your proxool configuration.
You should dispose your connections when finished - so it returns to the
pool and can be reused by another thread.=20
=20
-------------------------------------------------------------------------=
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com <http://mail.giantcompany.com/>=20
-----Original Message-----
From: proxool-user-admin@...
[mailto:proxool-user-admin@...] On Behalf Of ice blast
Sent: lundi 16 f=E9vrier 2004 14:05
To: proxool-user@...
Subject: [Proxool-user] connection removed when still in use
Hi,=20
I just started using proxool and here is the scenario.
I am using the connection object within the endless loops. It actually
exists in run() method of a thread that implements Runnable interface.
=20
In the debug statement, it shows the following msg:
--------
302265 [HouseKeeper] WARN proxool.smsc - #0001 was active for 301343
milliseconds and has been removed automaticaly. The Thread responsible =
was
named 'AWT-EventQueue-0'.
-------
327271 [HouseKeeper] WARN proxool.smsService - #0001 was active for =
304328
milliseconds and has been removed automaticaly. The Thread responsible =
was
named 'Thread-3'.
-------
360639 [HouseKeeper] WARN proxool.smsc - #0002 was active for 337676
milliseconds and has been removed automaticaly. The Thread responsible =
was
named 'Thread-3'.
-------
=20
here is the properties that I set:
info.setProperty("proxool.maximum-connection-count", "30");
info.setProperty("proxool.house-keeping-test-sql", "select
CURRENT_DATE");
info.setProperty("house-keeping-sleeping-time", "15000");
info.setProperty("test-before-use", "true");
info.setProperty("test-after-use", "true");
ProxoolFacade.registerConnectionPool(url, info);
=20
I am using SQL Server 2000 with Microsoft JDBC Driver.
=20
Please. appreciate your help on this one. I am really confused.
=20
Regards,
Milliblast
=20
_____ =20
Do you Yahoo!?
Yahoo! Finance: Get
<http://us.rd.yahoo.com/evt=3D22055/*http://taxes.yahoo.com/filing.html&gt; =
your
refund fast by filing online

Hi Bertrand,
Thanks for your insights. H/ever, my code is like this:
public class foo implements Runnable{
run(){
Connection conn = DriverManager.getConnection("myalias");
while(!close){
PreparedStatement ps = conn.prepareStatement(SQL);
ps.execute();
for (int i=0; i<size; i++){
//use the connection here again
ps = conn.prepareStatement(SQL2);
ps.execute();
Thread.getCurrentThread().sleep(10000);
}
}
}
}
I am not returning the connection to the pool because I will need the connection until the application shutdown. this application behaves like a service and usually used for weeks before being shutdown. It is a Daemon actually.
Any suggestion will be appreciated.
Regards,
Milliblast
Bertrand Renuart <bertrand.renuart@...> wrote:
The log says you have a JDBC connection active since 300000ms which is higher than the maximum allowed by your proxool configuration.
You should dispose your connections when finished - so it returns to the pool and can be reused by another thread.
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
-----Original Message-----
From: proxool-user-admin@... [mailto:proxool-user-admin@...] On Behalf Of ice blast
Sent: lundi 16 février 2004 14:05
To: proxool-user@...
Subject: [Proxool-user] connection removed when still in use
Hi,
I just started using proxool and here is the scenario.
I am using the connection object within the endless loops. It actually exists in run() method of a thread that implements Runnable interface.
In the debug statement, it shows the following msg:
--------
302265 [HouseKeeper] WARN proxool.smsc - #0001 was active for 301343 milliseconds and has been removed automaticaly. The Thread responsible was named 'AWT-EventQueue-0'.
-------
327271 [HouseKeeper] WARN proxool.smsService - #0001 was active for 304328 milliseconds and has been removed automaticaly. The Thread responsible was named 'Thread-3'.
-------
360639 [HouseKeeper] WARN proxool.smsc - #0002 was active for 337676 milliseconds and has been removed automaticaly. The Thread responsible was named 'Thread-3'.
-------
here is the properties that I set:
info.setProperty("proxool.maximum-connection-count", "30");
info.setProperty("proxool.house-keeping-test-sql", "select CURRENT_DATE");
info.setProperty("house-keeping-sleeping-time", "15000");
info.setProperty("test-before-use", "true");
info.setProperty("test-after-use", "true");
ProxoolFacade.registerConnectionPool(url, info);
I am using SQL Server 2000 with Microsoft JDBC Driver.
Please. appreciate your help on this one. I am really confused.
Regards,
Milliblast
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Dear Bertrand,
I did try your suggestion. My proxool throws this exception:
----
138078 [Thread-3] WARN proxool.smsService - Unable to set status of connection 1 from ACTIVEto AVAILABLE. It remains NULL
----
139890 [Thread-3] ERROR proxool.ProxoolDriver - Problem
java.sql.SQLException: org.logicalcobwebs.proxool.ProxoolException: ConnectionCount is 30. Maximum connection count of 30 cannot be exceeded.
----
I set the max conn = 30 though. H/ever, since only I returned the connection to the pool at the end of the loop, it should not happen.
while(!close){
//....code
conn.close();
}
Any help will be appreciate.
MilliBlast
Bertrand Renuart <bertrand.renuart@...> wrote:
The log says you have a JDBC connection active since 300000ms which is higher than the maximum allowed by your proxool configuration.
You should dispose your connections when finished - so it returns to the pool and can be reused by another thread.
-------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
-----Original Message-----
From: proxool-user-admin@... [mailto:proxool-user-admin@...] On Behalf Of ice blast
Sent: lundi 16 février 2004 14:05
To: proxool-user@...
Subject: [Proxool-user] connection removed when still in use
Hi,
I just started using proxool and here is the scenario.
I am using the connection object within the endless loops. It actually exists in run() method of a thread that implements Runnable interface.
In the debug statement, it shows the following msg:
--------
302265 [HouseKeeper] WARN proxool.smsc - #0001 was active for 301343 milliseconds and has been removed automaticaly. The Thread responsible was named 'AWT-EventQueue-0'.
-------
327271 [HouseKeeper] WARN proxool.smsService - #0001 was active for 304328 milliseconds and has been removed automaticaly. The Thread responsible was named 'Thread-3'.
-------
360639 [HouseKeeper] WARN proxool.smsc - #0002 was active for 337676 milliseconds and has been removed automaticaly. The Thread responsible was named 'Thread-3'.
-------
here is the properties that I set:
info.setProperty("proxool.maximum-connection-count", "30");
info.setProperty("proxool.house-keeping-test-sql", "select CURRENT_DATE");
info.setProperty("house-keeping-sleeping-time", "15000");
info.setProperty("test-before-use", "true");
info.setProperty("test-after-use", "true");
ProxoolFacade.registerConnectionPool(url, info);
I am using SQL Server 2000 with Microsoft JDBC Driver.
Please. appreciate your help on this one. I am really confused.
Regards,
Milliblast
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Milliblast,
On Mon, 2004-02-16 at 15:00, ice blast wrote:
> ----
> 138078 [Thread-3] WARN proxool.smsService - Unable to set status of
> connection 1 from ACTIVEto AVAILABLE. It remains NULL
> ----
That sounds like you are repeatedly closing a connection. It's a bad
message that we are going to fix in 0.8.4. To be clear, your loop should
do this:
while (...) {
try {
connection = DriverManager.getConnection("proxool.alias");
...
} finally {
if (connection != null) {
connection.close();
connection = null;
}
}
}
The finally clause ensures that all is cleaned up nicely if you hit an
exception. Don't worry about the expense of getting a connection each
time: that's what connection pools are good at. It's really quick to get
a connection.
- Bill

Thanks. it worked for quite a while. H/ever after running for approx 2 hours, it stopped completely. Proxool producing a lot of warn msg saying that the active time has been reached and removing the connection. It produced about 5-6 of these messages [housekeeper]. I waited for about 10 mins or so and nothing happened so I checked with SQL Server. Apparently the connection is no longer exists. so I believe that the pooling mechanism get stuck somewhere.
any help is appreciated. Sorry to trouble you all so much.
here is the properties:
info.setProperty("proxool.maximum-connection-count", "30");
info.setProperty("proxool.house-keeping-test-sql", "select CURRENT_DATE");
info.setProperty("house-keeping-sleeping-time", "15000");
info.setProperty("test-before-use", "true");
info.setProperty("test-after-use", "true");
Regards,
MilliBlast
Bertrand Renuart <bertrand.renuart@...> wrote:
> Thanks a lot for your help. You guys are great.
> I checked with the object signature and it seems that the connection
> object is never the same.
>
Proxool does return the actual JDBC connection object but a wrapper around
it.
This way it can intercept the conn.close() and knows when you no-longer
needs it. It can then return the connection to the pool...
> H/ever, your solution work greats. H/ever, if I am not
> wrong, I can set the max thread lifetime with 'maximum-active-time'
> property, right? Is there anyway I can set it to infinite? Just
> asking though I think is no longer relevant here.
>
Not sure there is a way to set it to 'infinite'...
Anyway, this does make sense 'cause your connection will not be usable by
others - hence removing all the benefits of having a POOL of connections ;-)
> Are you guys the proxool developer?
>
I'm not - just an happy user ;-)
Bill is the actual Proxool author...
> Once again, thanks. I just hope that you two will answer my question again
in future.
>
Sure we will!
(faster than Bill this time ?)
----------------------------------------------------------------------------
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com
> -----Original Message-----
> From: proxool-user-admin@...
> [mailto:proxool-user-admin@...] On Behalf
> Of Bill Horsman
> Sent: lundi 16 février 2004 16:12
> To: proxool-user@...
> Subject: RE: [Proxool-user] connection removed when still in use
>
>
> Milliblast,
>
> On Mon, 2004-02-16 at 15:00, ice blast wrote:
>
> > ----
> > 138078 [Thread-3] WARN proxool.smsService - Unable to set
> status of
> > connection 1 from ACTIVEto AVAILABLE. It remains NULL
> > ----
>
> That sounds like you are repeatedly closing a connection.
> It's a bad message that we are going to fix in 0.8.4. To be
> clear, your loop should do this:
>
> while (...) {
> try {
> connection = DriverManager.getConnection("proxool.alias");
>
> ...
>
>
> } finally {
> if (connection != null) {
> connection.close();
> connection = null;
> }
> }
>
> }
>
> The finally clause ensures that all is cleaned up nicely if
> you hit an exception. Don't worry about the expense of
> getting a connection each
> time: that's what connection pools are good at. It's really
> quick to get a connection.
>
> - Bill
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&gt; &op=click
>
> _______________________________________________
>
> Proxool-user mailing list
> Proxool-user@...
> https://lists.sourceforge.net/lists/listinfo/proxool-user
>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Proxool-user mailing list
Proxool-user@...
https://lists.sourceforge.net/lists/listinfo/proxool-user
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id56&alloc_id438&op=click
_______________________________________________
Proxool-user mailing list
Proxool-user@...
https://lists.sourceforge.net/lists/listinfo/proxool-user
---------------------------------
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online

Milliblast,
On Mon, 2004-02-16 at 18:09, ice blast wrote:
> after running for approx 2 hours, it stopped completely. Proxool
> producing a lot of warn msg saying that the active time has been
> reached and removing the connection. It produced about 5-6 of these
> messages [housekeeper]. I waited for about 10 mins or so and nothing
> happened so I checked with SQL Server. Apparently the connection is no
> longer exists. so I believe that the pooling mechanism get stuck
> somewhere.
Can you send the code fragment for your loop?
Even if a connection is removed because it has been active for too long
this shouldn't stop Proxool building another one when you need it, so I
don't understand how it gets stuck.
- Bill
P.S. You only need to mail the list. If you copy me I just end up
getting it twice.