Re: jdbc - connection pool and connect frequency

  • From: "Radoulov, Dimitre" <cichomitiko@xxxxxxxxx>
  • To: Hemant K Chitale <hemantkchitale@xxxxxxxxx>, oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 03 Dec 2010 10:00:48 +0100


Thanks. Unfortunately, auditing for application users is disabled.
I though of heart-beat too, but I hope it uses the connection pool,
not fresh connections.

I just checked the number of requests per minute in three different environments - WL and Tomcat on Oracle 9.2 and 10.2:

$ tail -1000 listener_<sid_1>.log |   awk 'END {
    for (i in count)
  if (count[i] > 10)
    print i, count[i]
}
  /__jdbc__/ {
    sub(/:[^:]*$/, x, $2)
    count[$2]++
  }'
09:48 21
09:49 15
09:19 15
08:48 23
09:33 20
09:36 11
09:38 21
08:32 24
09:51 11
09:06 11
09:21 17
09:40 11


$ tail -1000 listener_<sid_2>.log |   awk 'END {
    for (i in count)
  if (count[i] > 10)
    print i, count[i]
}
  /__jdbc__/ {
    sub(/:[^:]*$/, x, $2)
    count[$2]++
  }'
09:48 23
09:49 15
09:13 18
08:45 31
09:01 28
09:05 21
08:37 27
09:23 13
08:52 27
08:54 52
09:44 11

This output is from a customer listener.log:

zsh-4.3.10[t]% tail -500 listener_<sid_3>.log |
awk 'END {
    for (i in count)
  if (count[i] > 10)
    print i, count[i]
}
  /__jdbc__/ {
    sub(/:[^:]*$/, x, $2)
    count[$2]++
  }'
10:47 18
10:29 13
10:39 30
10:49 18
10:59 24
10:30 12
10:31 30
10:50 12
10:41 12
10:32 12
11:00 12
10:51 18
10:42 42
10:33 18
11:01 18
10:43 18
11:02 18
10:45 24
11:04 12
10:46 42
10:37 24

The output lines could be out of order (this is specific to awk's associative arrays),
but the order doesn't matter in this case.

It should be great if list members, having access to application environments that use jdbc connection pools, could share their numbers (on Solaris the above command
won't work with plain awk (/usr/bin/awk) and nawk should be used instead.

Thank you very much!

Regards
Dimitre



On 03/12/2010 09:01, Hemant K Chitale wrote:

If it is at a very regular frequency, it could be a "heart-beat" test that the app server runs to ceheck database connectivity by quickly querying a specific table.

Otherwise it is a separate " application/program" from the server; but not using the CP.

Hemant K Chitale
http://hemantoracledba.blogspot.com
sent from my smartphone

On Dec 3, 2010 3:01 PM, "Radoulov, Dimitre" <cichomitiko@xxxxxxxxx <mailto:cichomitiko@xxxxxxxxx>> wrote:

Thank you Hemant,
I observe the same behavior in more than one completely separate
application environments with different app servers (Bea WL, Tomcat
etc.). In all those environments the connections (should, as far as I
know) come only from the app servers through the jdbc connection pool.

Could you kindly elaborate more on the rogue connections possibility?


Thank you again,
Dimitre



On Fri, Dec 3, 2010 at 5:01 AM, Hemant K Chitale
<hemantkchitale@xxxxxxxxx <mailto:hemantkchitale@xxxxxxxxx>> wrote:
> These are *fr...


Other related posts: