Hikari connection pool with oracle on azure - oracle

We are using Hikari Connection pool to connect to Oracle on Azure. We tried increasing the timeout value to 12000000 after consecutive connection time out error with a value 600000.
Error is intermittent
2022-04-06 08:32:18 java.lang.Exception: Error while getting connection
from connection pool for:#### Connection is not available, request
timed out after 300001ms.
What ever be the time we get this error intermittently.

Related

How to replication Connection reset by peer in Spring boot?

In my production environment I got the following error in my server:
Cannot forward to error page for request [/api/validation] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Connection reset by peer
Now I created a client and produced 1000 thread every second to call this [/api/validation].
The error I got was
Exception in thread "Thread-9954" org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:7080/v1/name/validate": Timeout waiting for connection from pool; nested exception is org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool.
Now I want to know is what is the cause of Connection reset by peer .
According to what I know is this error occurs when the client aborts the connection by sending the RST packet.
I set the socket Timeout of my client's rest template to 9000. I make the server sleep for about 15000 MS. Now shouldn't the server get Connection reset by peer as the server tries to send the response after 15 seconds and my client just waits for about 9 seconds. Shouldn't I get the error?
Also in the production environment the wait time (Rest template socket time out) for the client is set to about a 90 seconds ( more than the time the server requires to response). Why is the error being produced in the production?

DB Link throws ORA-28511: lost RPC connection to heterogeneous remote agent using SID

I use a DBLINK/Oracle Gateway to connect to an external non-oracle database. i have a timeout setting of 5 minutes.
when I connect using dblink, for the first time, it runs fine. After the idle time of 5 minutes, when I run the same sql again, it throws me the bellow error -
ORA-28511: lost RPC connection to heterogeneous remote agent using SID. ****
ORA-28509: unable to establish a connection to non-Oracle system
ORA-02063: preceding line from DB2T
Then when i run the sql again, its connecting fine. i guess its establishing a new connection.
Why am i getting the connection error and why oracle is not simply establishing a new connection when the previous connection is timed out?
Is there a way to not get the error and connect seamlessly or to suppress the error?
Easily replicable in sql developer by running a sql and waiting for 5 minutes.
Thanks in Advance.

ORA-12518 TNS:listener could not hand off client connection in data source from JBOSS 6,X

I am using ORACLE 12c database in our Application while starting Applications
showing below error.
WARN [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener refused the connection with the following error:
ORA-12518, TNS:listener could not hand off client connection
)
Could not obtain connection to query metadata: org.jboss.util.NestedSQLException: Unable to get managed connection for FooDB; - nested throwable: (javax.resource.ResourceException: Unable to get managed connection for FooDB)
Here is My connections URL:
jdbc:oracle:thin:#(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mydomain.com)(PORT=1521))
(LOAD_BALANCE=ON)(FAILOVER=ON)(CONNECT_DATA=(SERVER=SHARED)(SERVICE_NAME=FOODB)(FAILOVER_MODE=(.......
this unknown issue leads application performance issue while longing into app looking for any parameters to add from jboss as database is in 2 node clustered environment.
Thanks in advance.

Could not connect to broker URL after 5000 ms [JMS]

I use Spring Integration 3.0.0 with Active MQ 5.11.1 it works without any problem. but I noticed that when I stop Active MQ, i get error in my logs every 5 seconds.
if you have an idea for this problem?
Error :
ERROR [org.springframework.jms.listener.DefaultMessageListenerContainer#0-1] [DefaultMessageListenerContainer] Could not refresh JMS Connection for destination 'topic' - retrying in 5000 ms. Cause: Could not connect to broker URL: localhost. Reason: java.net.ConnectException: Connection refused: connect
When the listener container loses the connection, it tries to reconnect every 5 seconds by default until the broker is running again.
You can configure the time and/or add an exponential back off. See setRecoveryInterval and setBackOff.
Or, call stop() on the container to stop the attempts.
Call start() to start again.

Oracle connection error

java.sql.SQLException: Io exception: The Network Adapter could not establish the
connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java)
I am getting this error when data in database is increased (nearly 3000). It works fine with limited data (say 100).
The Network Adapter could not establish the connection
Is typically thrown when
the Oracle listener is not running
the wrong hostname was specified in the connection url
the wrong port was specified in the connection url
the port is blocked by firewall
I have never seen it related to "increasing" the data in the database

Resources