Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I avoid ResourceExceptions when sending more requests for database connections from the connection pool than are currently available?

0
Posted

How can I avoid ResourceExceptions when sending more requests for database connections from the connection pool than are currently available?

0

The fundamental problem is too few resources (database connections in the connection pool) for the work load. The correct response is to increase the maximum number of connections in the connection pool. Optimally designed applications only require the server to have one pool connection per execute thread.

0

A. The fundamental problem is too few resources (database connections in the connection pool) for the work load. The correct response is to increase the maximum number of connections in the connection pool. Optimally designed applications only require the server to have one pool connection per execute thread. You can also enable connection requests to wait for a connection. See “Enabling Connection Requests to Wait for a Connection” in Programming WebLogic JDBC. Note that the proper application response to a resource exception is not to retry the request in a tight loop, which would tie up execute threads on the server. You should design your application to gracefully fail if no connections are available. Try to ensure that you get the connection as late as possible in your application code and return it to the connection pool as early as possible so that you do not see as many NoResource exceptions. It is better to have the connection as a method level variable and close the connectio

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123