RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Hi Chris, Thank you for your reply!! Please note that we tried to make changes to the contex.xml file located under the conf directory of tomcat. On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: The properties we were modifying are given below . > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> However, on restarting the tomcat server after making changes to values in these, the application is throwing a 404: Resource not Found error. The tomcat server is up and running but on hitting the application URL, we are getting the 404 error. We even tried restoring the context.xml file to its original values but that did not seem to make a difference. Can you please advise what steps we need to follow in order to fix this issue? Thanks and Regards, Arpan Arpan Halder Tata Consultancy Services providing services to: Global Data and Analytics Application Support / ITAS Route 22 West▪NJ 08876 ▪ USA Mobile: +1 (908) 392 2947 -----Original Message----- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Sunday, February 18, 2018 11:13 AM To: users@tomcat.apache.org Subject: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: That is the wrong file. The file conf/context.xml contains the defaults for every application deployed onto that Tomcat server. Your application should have its own, separate context.xml file in the META-INF directory. > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> Okay. > Could you please check which are the parameters to add/modify/delete. Everything looks okay up there. You might want to add: logAbandoned="true" This will log places in your code where you have resource leaks. > Also we could locate another "context.xml" under " > /apps/apache-tomcat-7.0.67/webapps/host-manager/META-INF" and " > /apps/apache-tomcat-7.0.67/webapps/manager/META-INF" path - could you > please advise if we need to make any change here Those are the deployment descriptors for the host-manager and the manager applications respectively. Do not modify those files. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqJpggACgkQHPApP6U8 pFi3UQ/+K3rSSb0cke4obIjlrZUrOsiPFCsNPRPl9iTRvU/L1AGb8cJ1YjPdbu03 Veac/wM3gNa9PgRpfUImq9gaKl03MjMCfyCGMfX1Z/dJWcw8WNiFGDxW69O+sANl ALoFBzi0ya0icYKFfk7EF4e7DkZ9Jcwp0CfE319Z7+b/rTUNhD3AMjRsW0LK3E0c kxr6qbu0Ba+WmuITLKXSLGJBAW9nNBLIJ+WuO73S7UpTVWBexXLTNAyNheG6KFJl eC7ukAyunrXagoKmC6JAVl2wboNGgCZStIuj+htq/nxjRSb7MA+uSah+uzCPR94k GC17fhxPx76seW3kbmt8UUPU1thqUjsE+pXgmskHlUw70al3MO59rdjuoRm0ac3r +TrtCoeanYQYfXGJmHI8tClZ2f2qhwhfZ0Co9DxF/Pjz8V/01CXKYHfeV3a74+GF LTw2MHfwHXT8NgpmixCExC47HNGrYDqZG7gNtmKiytIaAi+f0otEjFLvlNeRId67 Fs9pXlyBDlwhPigFj1Uv4f3yBw2cqsZDvL7YD6tioU48ptu113yM0R4S61x4xAZw bwpuZomRgzbsOHvoWkNfQ3/1H6U/YEJvmUFJ/D9mmjEfSZq+u0czZ4jiRkcz3shA EKyatdAlRGBcT21t/AkdR6QRPaAB5YPOuj+/+ycVVXRXT7uln7M= =EpQk -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Hello, Please note that we tried to make changes to the contex.xml file located under the conf directory of tomcat. On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: The properties we were modifying are given below . > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> However, on restarting the tomcat server after making changes to values in these, the application is throwing a 404: Resource not Found error. The tomcat server is up and running but on hitting the application URL, we are getting the 404 error. We even tried restoring the context.xml file to its original values but that did not seem to make a difference. A screenshot of the error is attached to this email. Can you please look into this and let us know what steps we need to follow in order to fix this issue? Best Regards, Aakash -----Original Message- From: Halder, Arpan [ITSUS Non J&J] Sent: Monday, February 19, 2018 3:57 AM To: DL-MD-R&D-SUPPORT Subject: Fw: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object ____________ From: Christopher Schultz Sent: Sunday, February 18, 2018 11:12:56 AM To: users@tomcat.apache.org Subject: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: That is the wrong file. The file conf/context.xml contains the defaults for every application deployed onto that Tomcat server. Your application should have its own, separate context.xml file in the META-INF directory. > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> Okay. > Could you please check which are the parameters to > add/modify/delete. Everything looks okay up there. You might want to add: logAbandoned="true" This will log places in your code where you have resource leaks. > Also we could locate another "context.xml" under " > /apps/apache-tomcat-7.0.67/webapps/host-manager/META-INF" and " > /apps/apache-tomcat-7.0.67/webapps/manager/META-INF" path - could > you please advise if we need to make any change here Those are the deployment descriptors for the host-manager and the manager applications respectively. Do not modify those files. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqJpggACgkQHPApP6U8 pFi3UQ/+K3rSSb0cke4obIjlrZUrOsiPFCsNPRPl9iTRvU/L1AGb8cJ1YjPdbu03 Veac/wM3gNa9PgRpfUImq9gaKl03MjMCfyCGMfX1Z/dJWcw8WNiFGDxW69O+sANl ALoFBzi0ya0icYKFfk7EF4e7DkZ9Jcwp0CfE319Z7+b/rTUNhD3AMjRsW0LK3E0c kxr6qbu0Ba+WmuITLKXSLGJBAW9nNBLIJ+WuO73S7UpTVWBexXLTNAyNheG6KFJl eC7ukAyunrXagoKmC6JAVl2wboNGgCZStIuj+htq/nxjRSb7MA+uSah+uzCPR94k GC17fhxPx76seW3kbmt8UUPU1thqUjsE+pXgmskHlUw70al3MO59rdjuoRm0ac3r +TrtCoeanYQYfXGJmHI8tClZ2f2qhwhfZ0Co9DxF/Pjz8V/01CXKYHfeV3a74+GF LTw2MHfwHXT8NgpmixCExC47HNGrYDqZG7gNtmKiytIaAi+f0otEjFLvlNeRId67 Fs9pXlyBDlwhPigFj1Uv4f3yBw2cqsZDvL7YD6tioU48ptu113yM0R4S61x4xAZw bwpuZomRgzbsOHvoWkNfQ3/1H6U/YEJvmUFJ/D9mmjEfSZq+u0czZ4jiRkcz3shA EKyatdAlRGBcT21t/AkdR6QRPaAB5YPOuj+/+ycVVXRXT7uln7M= =EpQk -END PGP SIGNATURE- - 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
Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/16/18 6:58 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could able to locate context.xml under " > /apps/apache-tomcat-7.0.67/conf" path - see below: That is the wrong file. The file conf/context.xml contains the defaults for every application deployed onto that Tomcat server. Your application should have its own, separate context.xml file in the META-INF directory. > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/spectra"/> > > type="javax.sql.DataSource" maxActive="50" maxIdle="30" > maxWait="1" username="saevdcep" password="xxx" > driverClassName="org.postgresql.Driver" > url="jdbc:postgresql://itsusralsp06829:5432/evidencesearch"/> Okay. > Could you please check which are the parameters to > add/modify/delete. Everything looks okay up there. You might want to add: logAbandoned="true" This will log places in your code where you have resource leaks. > Also we could locate another "context.xml" under " > /apps/apache-tomcat-7.0.67/webapps/host-manager/META-INF" and " > /apps/apache-tomcat-7.0.67/webapps/manager/META-INF" path - could > you please advise if we need to make any change here Those are the deployment descriptors for the host-manager and the manager applications respectively. Do not modify those files. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqJpggACgkQHPApP6U8 pFi3UQ/+K3rSSb0cke4obIjlrZUrOsiPFCsNPRPl9iTRvU/L1AGb8cJ1YjPdbu03 Veac/wM3gNa9PgRpfUImq9gaKl03MjMCfyCGMfX1Z/dJWcw8WNiFGDxW69O+sANl ALoFBzi0ya0icYKFfk7EF4e7DkZ9Jcwp0CfE319Z7+b/rTUNhD3AMjRsW0LK3E0c kxr6qbu0Ba+WmuITLKXSLGJBAW9nNBLIJ+WuO73S7UpTVWBexXLTNAyNheG6KFJl eC7ukAyunrXagoKmC6JAVl2wboNGgCZStIuj+htq/nxjRSb7MA+uSah+uzCPR94k GC17fhxPx76seW3kbmt8UUPU1thqUjsE+pXgmskHlUw70al3MO59rdjuoRm0ac3r +TrtCoeanYQYfXGJmHI8tClZ2f2qhwhfZ0Co9DxF/Pjz8V/01CXKYHfeV3a74+GF LTw2MHfwHXT8NgpmixCExC47HNGrYDqZG7gNtmKiytIaAi+f0otEjFLvlNeRId67 Fs9pXlyBDlwhPigFj1Uv4f3yBw2cqsZDvL7YD6tioU48ptu113yM0R4S61x4xAZw bwpuZomRgzbsOHvoWkNfQ3/1H6U/YEJvmUFJ/D9mmjEfSZq+u0czZ4jiRkcz3shA EKyatdAlRGBcT21t/AkdR6QRPaAB5YPOuj+/+ycVVXRXT7uln7M= =EpQk -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Hi Chris, Thanks a lot for your help!!Much appreciated!! We could able to locate context.xml under " /apps/apache-tomcat-7.0.67/conf" path - see below: WEB-INF/web.xml Could you please check which are the parameters to add/modify/delete. Also we could locate another "context.xml" under " /apps/apache-tomcat-7.0.67/webapps/host-manager/META-INF" and " /apps/apache-tomcat-7.0.67/webapps/manager/META-INF" path - could you please advise if we need to make any change here: > > 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: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqHXlsdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFh93w/+PO/2xkpVXDwEZQHL cGmR7kT7YuGNHU+ROu/cDuITm2TKMPzkl4HcvVS6heIbe/bZUVHm7Xf66mF9ArUc WKXJ4KB6JDnrF3Lgpg3otMFNs65Kd90Ku5Azos/QF7evmKGoJ386HyQCoJPRCPW4 qaIUB1qhbhESbPSs+WUkH5RSDUXpw6YA8+Q9ZgpFaNrEncAL7mZFLcM60NMLHLFQ 6l1zbz8i6fzXvjzWhYHdEBOOqVtaaR8vMK8QQ3RzWEwz0jtRS+P9dTfXfny40gRg 2B0yC5ZbcW+v7ya7VxhScjOrGnFQawsxyzW2i+DQfynERLMkZtpz3kxOqiGHehAV Qbe3yUgS8QaEh0rmD6hjFQMIUtDtr93ULlFGU27/Bl18cI02X/DQJn6D+dChSdus o85UImx/KfxTEFPru6gGFrrWHdMNvs2jh2PcEdRNf/X104kgZAdfcf9P9LtB7zZH LbERS+bqrY8UaloITcPl8hluPb57xfMn0F3SKo/52ZXQj5pB4NlUX66tAZGp1mfg id5OdHrbFsF4lyaULnF54oh5AfOnL3azkz8InZSfVeX+mnEFNfGF0mrWB76vGKBk Wwff96PGK5a6LnsHmIm8lEw5ZGYK8hkaELFTPA51qF8WQUWKMoXNVD2KtfVa/NUw hAbcuPVPHWqlgWZazlxyY7fs+WE= =sdf2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/16/18 3:13 PM, Halder, Arpan [ITSUS Non J&J] wrote: > We could locate the parameters in "jdbc-pool.html" file located > under apache-tomcat-7.0.67/webapps/docs" path. Is there somewhere > else we need to look into for this file? Could you please advise on > where we could find the file. I think you might need another member of your team to advise you on this subject and maybe represent you within this community. The file in question is part of Tomcat's user manual. It is not a configuration file, and is not a part of your own application. > Also in case the mentioned file is correct file but it is not > configured for our database - could you please let me know what is > the process of modification/setting up parameters and what are the > parameters we need to set in case it is not done for our case. The real configuration is usually in a file called context.xml in your application's META-INF directory. - -chris > -Original Message- From: Christopher Schultz > [mailto:ch...@christopherschultz.net] Sent: Friday, February 16, > 2018 2:24 PM To: users@tomcat.apache.org Subject: [EXTERNAL] Re: > [E] Re: Cannot get a connection, pool error Timeout waiting for > ideal object > > Arpan, > > On 2/15/18 8:54 AM, Halder, Arpan [ITSUS Non J&J] wrote: >> We have already setup below parameters in jdbc-pool.html (see >> below) – could you please advise if we need to modify/add >> anything else here: > >> And here is an example on how to configure a resource for JNDI >> lookups <Resource >> name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" >> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" >> testWhileIdle="true" testOnBorrow="true" testOnReturn="false" >> validationQuery="SELECT 1" validationInterval="3" >> timeBetweenEvictionRunsMillis="3" maxActive="100" >> minIdle="10" maxWait="1" initialSize="10" >> removeAbandonedTimeout="60" removeAbandoned="true" >> logAbandoned="true" minEvictableIdleTimeMillis="3" >> jmxEnabled="true" >> jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionS t > >> >> ate; > > > org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer" >> username="root" password="password" >> driverClassName="com.mysql.jdbc.Driver" >> url="jdbc:mysql://localhost:3306/mysql"/> > > Looks like you copy/pasted that from the Tomcat documentation. How > about copy/pasting your actual configuration (without any secrets, > of course) just in case there are any errors in your > interpretation. > > Are you sure you don't have capacity problems? If you have only > e.g. 10 connections available but hundreds of users, perhaps you > simply need more connections. Are you sure the database is > available and reachable via the network? > > Sometimes timeouts are simply a reality. But if you start to see > "timeout" errors and the database is NOT DOWN and still reachable, > but everything grinds to a halt, then you certainly have a > resource problem. > > I disagree with another poster about abandoned connections: do not > remove them. Log them and allow the pool to become exhausted. That > way, you'll end up finding and fixing the problems instead of just > continuing to bleed. > > -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: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQJRBAEBCAA7FiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqHXlsdHGNocmlzQGNo cmlzdG9waGVyc2NodWx0ei5uZXQACgkQHPApP6U8pFh93w/+PO/2xkpVXDwEZQHL cGmR7kT7YuGNHU+ROu/cDuITm2TKMPzkl4HcvVS6heIbe/bZUVHm7Xf66mF9ArUc WKXJ4KB6JDnrF3Lgpg3otMFNs65Kd90Ku5Azos/QF7evmKGoJ386HyQCoJPRCPW4 qaIUB1qhbhESbPSs+WUkH5RSDUXpw6YA8+Q9ZgpFaNrEncAL7mZFLcM60NMLHLFQ 6l1zbz8i6fzXvjzWhYHdEBOOqVtaaR8vMK8QQ3RzWEwz0jtRS+P9dTfXfny40gRg 2B0yC5ZbcW+v7ya7VxhScjOrGnFQawsxyzW2i+DQfynERLMkZtpz3kxOqiGHehAV Qbe3yUgS8QaEh0rmD6hjFQMIUtDtr93ULlFGU27/Bl18cI02X/DQJn6D+dChSdus o85UImx/KfxTEFPru6gGFrrWHdMNvs2jh2PcEdRNf/X104kgZAdfcf9P9LtB7zZH LbERS+bqrY8UaloITcPl8hluPb57xfMn0F3SKo/52ZXQj5pB4NlUX66tAZGp1mfg id5OdHrbFsF4lyaULnF54oh5AfOnL3azkz8InZSfVeX+mnEFNfGF0mrWB76vGKBk Wwff96PGK5a6LnsHmIm8lEw5ZGYK8hkaELFTPA51qF8WQUWKMoXNVD2KtfVa/NUw hAbcuPVPHWqlgWZazlxyY7fs+WE= =sdf2 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Hi Chris, Thank you for your reply!! We could locate the parameters in "jdbc-pool.html" file located under apache-tomcat-7.0.67/webapps/docs" path. Is there somewhere else we need to look into for this file? Could you please advise on where we could find the file. Also in case the mentioned file is correct file but it is not configured for our database - could you please let me know what is the process of modification/setting up parameters and what are the parameters we need to set in case it is not done for our case. Thank you in advance and appreciate your help!! Thanks and Regards, Arpan Arpan Halder Tata Consultancy Services providing services to: Global Data and Analytics Application Support / ITAS Route 22 West▪NJ 08876 ▪ USA Mobile: +1 (908) 392 2947 -Original Message- From: Christopher Schultz [mailto:ch...@christopherschultz.net] Sent: Friday, February 16, 2018 2:24 PM To: users@tomcat.apache.org Subject: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/15/18 8:54 AM, Halder, Arpan [ITSUS Non J&J] wrote: > We have already setup below parameters in jdbc-pool.html (see > below) – could you please advise if we need to modify/add anything > else here: > > And here is an example on how to configure a resource for JNDI > lookups <Resource > name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" > testWhileIdle="true" testOnBorrow="true" testOnReturn="false" > validationQuery="SELECT 1" validationInterval="3" > timeBetweenEvictionRunsMillis="3" maxActive="100" minIdle="10" > maxWait="1" initialSize="10" removeAbandonedTimeout="60" > removeAbandoned="true" logAbandoned="true" > minEvictableIdleTimeMillis="3" jmxEnabled="true" > jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionSt ate; > > org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer" > username="root" password="password" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/mysql"/> Looks like you copy/pasted that from the Tomcat documentation. How about copy/pasting your actual configuration (without any secrets, of course) just in case there are any errors in your interpretation. Are you sure you don't have capacity problems? If you have only e.g. 10 connections available but hundreds of users, perhaps you simply need more connections. Are you sure the database is available and reachable via the network? Sometimes timeouts are simply a reality. But if you start to see "timeout" errors and the database is NOT DOWN and still reachable, but everything grinds to a halt, then you certainly have a resource problem. I disagree with another poster about abandoned connections: do not remove them. Log them and allow the pool to become exhausted. That way, you'll end up finding and fixing the problems instead of just continuing to bleed. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqHL+YACgkQHPApP6U8 pFgbDxAAhmn6nD0edc0F/3eh3izdZ9KnV5sUAC/E5ubv/1tc+KiE/GPZUhiy/qSa n4Am3KEhXmyee+ZcQFUg1PNqeZGgq/uLdppeZHG0Vsv0lYH/I1xBJMoluEpDzzQN nnRFQEHCqlB+ujBP5G4bQGLRuh5fhwVRz9lktoQnwDybG/KjzTh56+SZmYXABSEn JMFEbr6+ADafPVUiSmu8uMklenH5YXYMXiiB6dAXdtpP/SHAGxko05c0j1g+Snq1 WrM17qKpGI2qdQaXlfr8NChBuXrNQz8zj+2HJrNxzRLDa56GmVBq7tbvgwQwmdTb r1vqW1sEl4l3y8fnUxFJlyoQixQ8wPKDQH7H8NPpMkts4SyRULqRwpJvp6/L+TYy D8Ge2j+9uZCxUcccA0ds3E8j1r+FjtpU6w8Ut1ZJIb071JmtEDlvRTYyAEt0Q69w 3MJa0dA59DJ8l4/A2KzNuDhFYtkmuf1UmBHxw6qsfqsseqFD3AzDVcbirpxwNdIj 1mtbH91Fl+hSN4Ww4gGQLXjUfLf1o8MR0bkeLy5236k2UajuH1Jbvf8xCh6GlQoc yp7PH61Kw5vb2M5Yjqg0C0OSgXspagYYATCM4Y2QTBATUrpLHTLYv679yKXCMPgq wQlvIn4+jpxnFpB2fhY5ZWH0VdilWhXG8uhGz2FJCI9XhWUaAws= =vd5m -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Arpan, On 2/15/18 8:54 AM, Halder, Arpan [ITSUS Non J&J] wrote: > We have already setup below parameters in jdbc-pool.html (see > below) – could you please advise if we need to modify/add anything > else here: > > And here is an example on how to configure a resource for JNDI > lookupsname="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" > factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" > testWhileIdle="true" testOnBorrow="true" testOnReturn="false" > validationQuery="SELECT 1" validationInterval="3" > timeBetweenEvictionRunsMillis="3" maxActive="100" minIdle="10" > maxWait="1" initialSize="10" removeAbandonedTimeout="60" > removeAbandoned="true" logAbandoned="true" > minEvictableIdleTimeMillis="3" jmxEnabled="true" > jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionSt ate; > > org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer" > username="root" password="password" > driverClassName="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:3306/mysql"/> Looks like you copy/pasted that from the Tomcat documentation. How about copy/pasting your actual configuration (without any secrets, of course) just in case there are any errors in your interpretation. Are you sure you don't have capacity problems? If you have only e.g. 10 connections available but hundreds of users, perhaps you simply need more connections. Are you sure the database is available and reachable via the network? Sometimes timeouts are simply a reality. But if you start to see "timeout" errors and the database is NOT DOWN and still reachable, but everything grinds to a halt, then you certainly have a resource problem. I disagree with another poster about abandoned connections: do not remove them. Log them and allow the pool to become exhausted. That way, you'll end up finding and fixing the problems instead of just continuing to bleed. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlqHL+YACgkQHPApP6U8 pFgbDxAAhmn6nD0edc0F/3eh3izdZ9KnV5sUAC/E5ubv/1tc+KiE/GPZUhiy/qSa n4Am3KEhXmyee+ZcQFUg1PNqeZGgq/uLdppeZHG0Vsv0lYH/I1xBJMoluEpDzzQN nnRFQEHCqlB+ujBP5G4bQGLRuh5fhwVRz9lktoQnwDybG/KjzTh56+SZmYXABSEn JMFEbr6+ADafPVUiSmu8uMklenH5YXYMXiiB6dAXdtpP/SHAGxko05c0j1g+Snq1 WrM17qKpGI2qdQaXlfr8NChBuXrNQz8zj+2HJrNxzRLDa56GmVBq7tbvgwQwmdTb r1vqW1sEl4l3y8fnUxFJlyoQixQ8wPKDQH7H8NPpMkts4SyRULqRwpJvp6/L+TYy D8Ge2j+9uZCxUcccA0ds3E8j1r+FjtpU6w8Ut1ZJIb071JmtEDlvRTYyAEt0Q69w 3MJa0dA59DJ8l4/A2KzNuDhFYtkmuf1UmBHxw6qsfqsseqFD3AzDVcbirpxwNdIj 1mtbH91Fl+hSN4Ww4gGQLXjUfLf1o8MR0bkeLy5236k2UajuH1Jbvf8xCh6GlQoc yp7PH61Kw5vb2M5Yjqg0C0OSgXspagYYATCM4Y2QTBATUrpLHTLYv679yKXCMPgq wQlvIn4+jpxnFpB2fhY5ZWH0VdilWhXG8uhGz2FJCI9XhWUaAws= =vd5m -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Hi Margaret, Thank you for your reply!! We have already setup below parameters in jdbc-pool.html (see below) – could you please advise if we need to modify/add anything else here: And here is an example on how to configure a resource for JNDI lookups <Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" testWhileIdle="true" testOnBorrow="true" testOnReturn="false" validationQuery="SELECT 1" validationInterval="3" timeBetweenEvictionRunsMillis="3" maxActive="100" minIdle="10" maxWait="1" initialSize="10" removeAbandonedTimeout="60" removeAbandoned="true" logAbandoned="true" minEvictableIdleTimeMillis="3" jmxEnabled="true" jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState; org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer" username="root" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/mysql"/> Thanks and Regards, Arpan Arpan Halder Tata Consultancy Services providing services to: Global Data and Analytics Application Support / ITAS Route 22 West▪NJ 08876 ▪ USA Mobile: +1 (908) 392 2947 From: Bauer, Margaret M (Peggy) [mailto:margaret.m.ba...@verizon.com] Sent: Thursday, February 15, 2018 8:15 AM To: Tomcat Users List Cc: Halder, Arpan [ITSUS Non J&J] ; DL-MD-R&D-SUPPORT Subject: [EXTERNAL] Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object Verify your max connection is set high enough for the amount of traffic you see in your access logs that would be making a call to the DB. Possible code is not properly closing DB connections. Remove abandoned connections. add to your data source config On Thu, Feb 15, 2018 at 6:03 AM, Mark Thomas mailto:ma...@apache.org>> wrote: On 15/02/18 00:35, Halder, Arpan [ITSUS Non J&J] wrote: > Hi All, > > Need urgent help. We are using apache tomcat version -7.0.67 and > sporadically facing issue that application become unresponsive and below > error message encountered in Catalina.out log: > > ExceptionCannot get a connection, pool error Timeout waiting for idle object > Exception in detailorg.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get > a connection, pool error Timeout waiting for idle object > within doFilter of Session Filter > url :/SPECTRA/login > Chain.doFilter().. > Inside Login Method. > > We had to restart tomcat service every time and issue gets resolved for the > time being and again reappears sporadically. Could you please advise if we > need to change any tomcat setting to mitigate this issue from happening in > future. > > Please let us know if you need anything else from my side in this regards. > Thank you in advance. It sounds like you have a connection leak in your application. Enable abandoned connection logging to find out where the leaked connections are being created. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org> For additional commands, e-mail: users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org> -- Peggy Bauer CAO Production Support 214-770-1782
Re: [E] Re: Cannot get a connection, pool error Timeout waiting for ideal object
Verify your max connection is set high enough for the amount of traffic you see in your access logs that would be making a call to the DB. Possible code is not properly closing DB connections. Remove abandoned connections. add to your data source config On Thu, Feb 15, 2018 at 6:03 AM, Mark Thomas wrote: > On 15/02/18 00:35, Halder, Arpan [ITSUS Non J&J] wrote: > > Hi All, > > > > Need urgent help. We are using apache tomcat version -7.0.67 and > sporadically facing issue that application become unresponsive and below > error message encountered in Catalina.out log: > > > > ExceptionCannot get a connection, pool error Timeout waiting for idle > object > > Exception in detailorg.apache.tomcat.dbcp.dbcp.SQLNestedException: > Cannot get a connection, pool error Timeout waiting for idle object > > within doFilter of Session Filter > > url :/SPECTRA/login > > Chain.doFilter().. > > Inside Login Method. > > > > We had to restart tomcat service every time and issue gets resolved for > the time being and again reappears sporadically. Could you please advise if > we need to change any tomcat setting to mitigate this issue from happening > in future. > > > > Please let us know if you need anything else from my side in this > regards. Thank you in advance. > > It sounds like you have a connection leak in your application. Enable > abandoned connection logging to find out where the leaked connections > are being created. > > Mark > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- *Peggy Bauer* CAO Production Support 214-770-1782