You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Julien Martin <ba...@gmail.com> on 2013/03/22 15:45:15 UTC

Where does Tomcat log the logAbandoned information?

Hello,

I have enabled the *logAbandoned* property as follows (in Spring):

<property name="maxActive" value="2"/>
<property name="logAbandoned" value="true"/>
<property name="removeAbandoned" value="true"/>

I know for certain it is taken into account by Tomcat but *I just can't
figure out where the information is logged*.

It seems to be a recurring question on the web but I was not able to find
the answer to it.

Can anyone please informed advice?
Regards,

Julien.

Re: Where does Tomcat log the logAbandoned information?

Posted by Rainer Jung <ra...@kippdata.de>.
On 22.03.2013 16:12, Pid wrote:
> On 22/03/2013 15:02, Julien Martin wrote:
>> Hi Pid,
>> Is there any other config I need to add (for instance to log4j.properties)
>> in order for the logAbandoned logging to occur?
> 
> Actually, you're right this is DBCP inside your app - so you might need
> to look in an app log if there is one.
> 
> 
>> I see nothing in stdout nor in the tomcat logs...
> 
> Maybe you're not waiting long enough or there's no abandoned connections
> to be logged.

AFAIR DBCP doesn't use a log framework and instead uses writing
System.out. So catalina.out is your friend in this case.

Regards,

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Where does Tomcat log the logAbandoned information?

Posted by Julien Martin <ba...@gmail.com>.
Any idea what the logs should look like? Any sample?
J.

2013/3/22 Pid <pi...@pidster.com>

> On 22/03/2013 15:02, Julien Martin wrote:
> > Hi Pid,
> > Is there any other config I need to add (for instance to
> log4j.properties)
> > in order for the logAbandoned logging to occur?
>
> Actually, you're right this is DBCP inside your app - so you might need
> to look in an app log if there is one.
>
>
> > I see nothing in stdout nor in the tomcat logs...
>
> Maybe you're not waiting long enough or there's no abandoned connections
> to be logged.
>
>
> p
>
>
> > Regards,
> > J.
> >
> > 2013/3/22 Pid <pi...@pidster.com>
> >
> >> On 22/03/2013 14:45, Julien Martin wrote:
> >>> Hello,
> >>>
> >>> I have enabled the *logAbandoned* property as follows (in Spring):
> >>>
> >>> <property name="maxActive" value="2"/>
> >>> <property name="logAbandoned" value="true"/>
> >>> <property name="removeAbandoned" value="true"/>
> >>>
> >>> I know for certain it is taken into account by Tomcat but *I just can't
> >>> figure out where the information is logged*.
> >>
> >> It will be logged to standard out, catalina.out or catalina.{date}.log
> >>
> >> In your case, the timeBetweenEvictionRunsMillis check will happen every
> >> 1800000 millis, which is 1800 seconds, which is every 30 minutes for
> >> connections that have been idle the same period, which may mean that
> >> they don't qualify for eviction for over 30 mins, which in turn would
> >> mean the next check - 30m later.
> >>
> >> Maybe you should reduce that number during testing.
> >>
> >>
> >> p
> >>
> >>
> >>> It seems to be a recurring question on the web but I was not able to
> find
> >>> the answer to it.
> >>>
> >>> Can anyone please informed advice?
> >>> Regards,
> >>>
> >>> Julien.
> >>>
> >>
> >>
> >> --
> >>
> >> [key:62590808]
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
>
>
> --
>
> [key:62590808]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Where does Tomcat log the logAbandoned information?

Posted by Pid <pi...@pidster.com>.
On 22/03/2013 15:02, Julien Martin wrote:
> Hi Pid,
> Is there any other config I need to add (for instance to log4j.properties)
> in order for the logAbandoned logging to occur?

Actually, you're right this is DBCP inside your app - so you might need
to look in an app log if there is one.


> I see nothing in stdout nor in the tomcat logs...

Maybe you're not waiting long enough or there's no abandoned connections
to be logged.


p


> Regards,
> J.
> 
> 2013/3/22 Pid <pi...@pidster.com>
> 
>> On 22/03/2013 14:45, Julien Martin wrote:
>>> Hello,
>>>
>>> I have enabled the *logAbandoned* property as follows (in Spring):
>>>
>>> <property name="maxActive" value="2"/>
>>> <property name="logAbandoned" value="true"/>
>>> <property name="removeAbandoned" value="true"/>
>>>
>>> I know for certain it is taken into account by Tomcat but *I just can't
>>> figure out where the information is logged*.
>>
>> It will be logged to standard out, catalina.out or catalina.{date}.log
>>
>> In your case, the timeBetweenEvictionRunsMillis check will happen every
>> 1800000 millis, which is 1800 seconds, which is every 30 minutes for
>> connections that have been idle the same period, which may mean that
>> they don't qualify for eviction for over 30 mins, which in turn would
>> mean the next check - 30m later.
>>
>> Maybe you should reduce that number during testing.
>>
>>
>> p
>>
>>
>>> It seems to be a recurring question on the web but I was not able to find
>>> the answer to it.
>>>
>>> Can anyone please informed advice?
>>> Regards,
>>>
>>> Julien.
>>>
>>
>>
>> --
>>
>> [key:62590808]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 


-- 

[key:62590808]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Where does Tomcat log the logAbandoned information?

Posted by Julien Martin <ba...@gmail.com>.
Hi Pid,
Is there any other config I need to add (for instance to log4j.properties)
in order for the logAbandoned logging to occur?
I see nothing in stdout nor in the tomcat logs...
Regards,
J.

2013/3/22 Pid <pi...@pidster.com>

> On 22/03/2013 14:45, Julien Martin wrote:
> > Hello,
> >
> > I have enabled the *logAbandoned* property as follows (in Spring):
> >
> > <property name="maxActive" value="2"/>
> > <property name="logAbandoned" value="true"/>
> > <property name="removeAbandoned" value="true"/>
> >
> > I know for certain it is taken into account by Tomcat but *I just can't
> > figure out where the information is logged*.
>
> It will be logged to standard out, catalina.out or catalina.{date}.log
>
> In your case, the timeBetweenEvictionRunsMillis check will happen every
> 1800000 millis, which is 1800 seconds, which is every 30 minutes for
> connections that have been idle the same period, which may mean that
> they don't qualify for eviction for over 30 mins, which in turn would
> mean the next check - 30m later.
>
> Maybe you should reduce that number during testing.
>
>
> p
>
>
> > It seems to be a recurring question on the web but I was not able to find
> > the answer to it.
> >
> > Can anyone please informed advice?
> > Regards,
> >
> > Julien.
> >
>
>
> --
>
> [key:62590808]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Where does Tomcat log the logAbandoned information?

Posted by Pid <pi...@pidster.com>.
On 22/03/2013 14:45, Julien Martin wrote:
> Hello,
> 
> I have enabled the *logAbandoned* property as follows (in Spring):
> 
> <property name="maxActive" value="2"/>
> <property name="logAbandoned" value="true"/>
> <property name="removeAbandoned" value="true"/>
> 
> I know for certain it is taken into account by Tomcat but *I just can't
> figure out where the information is logged*.

It will be logged to standard out, catalina.out or catalina.{date}.log

In your case, the timeBetweenEvictionRunsMillis check will happen every
1800000 millis, which is 1800 seconds, which is every 30 minutes for
connections that have been idle the same period, which may mean that
they don't qualify for eviction for over 30 mins, which in turn would
mean the next check - 30m later.

Maybe you should reduce that number during testing.


p


> It seems to be a recurring question on the web but I was not able to find
> the answer to it.
> 
> Can anyone please informed advice?
> Regards,
> 
> Julien.
> 


-- 

[key:62590808]

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org