-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Ayub,

On 6/22/20 05:41, Ayub Khan wrote:
> I am using HikariCP for connection pooling. If the database is
> leaking connections then I should see connection not available
> exception.

That probably depends upon your connection pool configuration. It's
definitely possible to configure a connection pool to leak connections
without complaint.

> How do I find out which file descriptors are leaking ?  these are
> not files open on disk as there is no explicit disk file I/O in
> this application.
You might have to use a profiler.

> I just use the below command to check for open file descriptors:
>
> watch "sudo ls /proc/`cat /var/run/tomcat8.pid`/fd/ | wc -l"

Felix's suggestions for how to check the types of file handles are
good. You should be able to get host:port information from the sockets
you are seeing and, I suspect, you'll find that they all point to your
database.

- -chris

> On Sun, Jun 21, 2020 at 8:18 PM Christopher Schultz <
> ch...@christopherschultz.net> wrote:
>
> Ayub,
>
> On 6/20/20 11:51, Ayub Khan wrote:
>>>> Sorry we are using  8.0.32 version of tomcat.
>>>>
>>>> below is the configuration:
>>>>
>>>> Server version: Apache Tomcat/8.0.32 (Ubuntu) Server built:
>>>> Jan 24 2020 16:24:30 UTC Server number:  8.0.32.0 OS Name:
>>>> Linux OS Version:     4.4.0-1087-aws Architecture:   amd64
>>>> JVM Version:    1.8.0_181-b13 JVM Vendor:     Oracle
>>>> Corporation
>>>>
>>>> I use the below command to check the file descriptors:
>>>>
>>>> watch "sudo ls /proc/`cat /var/run/tomcat8.pid`/fd/ | wc -l"
>
> So you know there is some kind of increase in file-handle use, but
> you don't know what types of file handles are increasing, right?
>
> Can you try to find out which kinds of file handles are
> increasing?
>
> I have a sneaking suspicion that it's your database connections
> and not actually files open on the disk.
>
> Are you using a database connection pool? If not, you should
> really use one and limit the number of connections to something
> sane. If you are using one, are you monitoring it to see how many
> connections are actually being used? Are you sure you are using
> proper resource management[1]? Even a single code-path that leaks
> connections can leak them quickly under load.
>
>>>> When there an issue related to broken files, this value
>>>> keeps increasing, the only way to bring it down is to remove
>>>> vm instance from AWS load balancer.> Which version of tomcat
>>>> should I install ?
>
> Tomcat 8.0.x hasn't been supported since its last release on 29
> June 2018. That was 8.0.53. Your release is from 8 February 2016
> and is dangerously out of date (unless you are using the
> Ubuntu-packaged version, in which case I hope they kept-up with
> security patches thee past 4 years).
>
> -chris
>
>>>> On Sat, Jun 20, 2020 at 6:28 PM Christopher Schultz <
>>>> ch...@christopherschultz.net> wrote:
>>>>
>>>> Ayub,
>>>>
>>>> On 6/19/20 16:46, Ayub Khan wrote:
>>>>>>> tomcat 8.5 broken pipe increases open files on ubuntu
>>>>>>> AWS
>>>>
>>>> Which exact version of Tomcat 8.5? If you aren't running the
>>>> latest version (8.5.56), please upgrade and re-test.
>>>>
>>>>>>> If there is slow response from db I see this stack
>>>>>>> trace and the open files goes high and the only way to
>>>>>>> open files go down is to remove the instance from
>>>>>>> Amazon load balancer.
>>>>>>>
>>>>>>> Is there a way to keep the open files low even when
>>>>>>> Broken pipe error is thrown ?
>>>>
>>>> What is your evidence that file handles are being left open?
>>>>
>>>> Which file handles are being left open?
>>>>
>>>> -chris
>>>>>
>>>>> ------------------------------------------------------------------
- ---
>>>>>
>>>>>
>
>>>>>
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>>>> For additional commands, e-mail:
>>>>> users-h...@tomcat.apache.org
>>>>>
>>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>>
>>
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl7w0U0ACgkQHPApP6U8
pFgnCw/9GxKtFIdNS71zYPAYgEY0O6bh4+SyvD7cWsNRwAEtN4jwwmvmbk+9ldGa
5u8jalMeWjBaYtVev+T7XQ0EOJN9ZuunyXHzKR8LeIqPCzka/34inQKBhlwOFyR+
lQUhod8VsDrQJ4lb2ZxC1yS/mnUFdKeV2u2Px9mIr5WdkfVAxYWCOuKTW9DrW3HE
nbPG5t3oiLS8Rx+xXssyaTii5DAaQm0X0FYkkPp1GQ8Tj0/fylsE17nV8LrxLTb5
qhv0l6avR2/IsXaD6DC8MjdUO6kz5hkWNLtO/WcKrIFI+xPcYs2+Hog7Hrajetwp
QR8f7R7ry0W0HLy3p3R10jMwDQzOWjn2RNxQqL2qfNGmOqMbTi2XskQhtkKPoM9Y
LqZJsG0Ax2kNr6N4YeYpotRVcGqCJDgLwQ3HMjkHW/Y1M4O2NicphW9iFd5L+X9Z
fh4KFz5XbAUM4py7IuMtj1SH/FrOMyfBtKl6ECJ98VbtoBPU0I6Kmc0lgbf3h9wD
yphZ+3pW6a9Oeroq7aRTd35XdFqLdi9eg4Ze19/KpAr0hw3pgPvQqZiqq5qhpOrv
HhNWfHhvzeXmmab0DeLB9On+FDp30svWv9hmAR1ZB8ViBeCDoFjaUxv1UltqS6NQ
m9UsvtNR3035EpiSw9p5Jh5+eiG6swSnJXQH4yZxkVNAsHthyBA=
=KsIE
-----END PGP SIGNATURE-----

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

Reply via email to