Time |
S |
Nick |
Message |
00:01 |
|
|
semperfried76 joined ##friendlyjava |
00:02 |
|
|
semperfried76 joined ##friendlyjava |
00:02 |
|
|
semperfried76 left ##friendlyjava |
01:41 |
|
|
HEGX64 joined ##friendlyjava |
04:40 |
|
|
HEGX64 joined ##friendlyjava |
06:12 |
|
|
aditsu joined ##friendlyjava |
07:00 |
|
|
aditsu joined ##friendlyjava |
12:17 |
|
aditsu |
hmm, I wonder how to find out which web application opened each database connection... |
12:34 |
|
pdurbin |
is there one connection per database? |
12:35 |
|
pulsar |
depending on the database you can list current open connections |
12:35 |
|
pulsar |
mysql will show the remote port |
12:35 |
|
pulsar |
use that and some netstat / lsof kungfu to get the process id |
12:35 |
|
pulsar |
https://dev.mysql.com/doc/refman/5.1/en/show-processlist.html |
12:36 |
|
aditsu |
pulsar: yes, but all the applications are running on the same pid :p |
12:36 |
|
aditsu |
pdurbin: no, and that's what I'm concerned about |
12:37 |
|
aditsu |
I was expecting 2 connections to a certain db, but I got 9 |
12:37 |
|
aditsu |
I wonder if it's just c3p0 acting out |
12:38 |
|
pdurbin |
hmm |
12:39 |
|
aditsu |
even on localhost, it's opening 3 instead of 1, but only when I'm not debugging :p |
12:39 |
|
pulsar |
validation query active or someting? |
12:40 |
|
aditsu |
what is that? |
12:40 |
|
pulsar |
"a ping" to the database |
12:40 |
|
pulsar |
come connection pools do that |
12:40 |
|
pulsar |
cant remember if c3p0 does that. |
12:40 |
|
pulsar |
like "select 1" |
12:40 |
|
pulsar |
sort of keep-alive / test if databse is still there "feature" |
12:41 |
|
aditsu |
I don't know.. the thing is, it doesn't happen if I stop at a breakpoint before opening the first connection and then step through the code |
12:44 |
|
pulsar |
but it does not sound like your app is leaking connections, right? |
12:44 |
|
aditsu |
I don't think so |
12:44 |
|
pulsar |
so why do you bother? tight on open connections resourceS? |
12:45 |
|
aditsu |
anyway, if it's just c3p0, it should close back the connections after maxIdleTime.. which is set to 2 hours |
12:45 |
|
aditsu |
(the extra ones) |
12:45 |
|
aditsu |
I'm just seeing unexpected behavior and wondering what's the reason |
12:46 |
|
pulsar |
try swapping it out to commons-pool and see if it suffers from same issues? |
12:46 |
|
pulsar |
dbcp that is. |
12:47 |
|
aditsu |
maybe some other time.. I don't have built-in support for that at the moment |
12:47 |
|
pulsar |
blueprint restrictions? |
12:47 |
|
aditsu |
what blueprint? |
12:48 |
|
pulsar |
whatever a company you do the job for dicatates as "standard libraries" |
12:48 |
|
aditsu |
nah, I use what I want |
12:50 |
|
aditsu |
ah, maybe it's a good time to upgrade c3p0 and see what happens :) |
12:56 |
|
aditsu |
still 3 connections on start |
12:56 |
|
aditsu |
(on localhost) |
12:58 |
|
aditsu |
anyway, might not be worth spending too much time on this :p |
13:00 |
|
aditsu |
haha, if I increase initialPoolSize from 1 to 2, it opens just 2 connections... sounds like it just needs one more on start (I have acquireIncrement=2); still, that doesn't fully explain the 9 |
15:28 |
|
|
mr_lou joined ##friendlyjava |
16:05 |
|
|
aditsu joined ##friendlyjava |
17:34 |
|
|
aditsu joined ##friendlyjava |