o.h.engine.jdbc.spi.SqlExceptionHelper : FATAL: query_wait_timeout - spring-boot

I am using SpringBoot application with PostgreSQL as database, I am doing Load Testing from Jmeter, Database is hosted in azure, when I try to hit 150 Rest request to Single API or endpoint parallelly/concurrently, I am getting below error but with 100 request it works successfully.
ERROR:
2022-12-21 17:29:43.000 WARN 1 --- [http-nio-8080-exec-60] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 08P01
2022-12-21 17:29:43.000 ERROR 1 --- [http-nio-8080-exec-60] o.h.engine.jdbc.spi.SqlExceptionHelper : FATAL: query_wait_timeout
2022-12-21 17:29:43.000 WARN 1 --- [http-nio-8080-exec-60] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 08006
2022-12-21 17:29:43.001 ERROR 1 --- [http-nio-8080-exec-60] o.h.engine.jdbc.spi.SqlExceptionHelper : An I/O error occurred while sending to the backend.
2022-12-21 17:29:43.090 WARN 1 --- [http-nio-8080-exec-61] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 08P01
2022-12-21 17:29:43.090 ERROR 1 --- [http-nio-8080-exec-61] o.h.engine.jdbc.spi.SqlExceptionHelper : FATAL: query_wait_timeout
I want to improve the performance of the application in short solve the above error when we auto-scale our application with two instances, 150 request are passed but when we run with a single instance, it gives the above error, I want to understand
whether it is a memory issue or a db issue?
How to resolve it ?`

As per documentation:
query_wait_timeout
Maximum time queries are allowed to spend waiting for execution. If the query is not assigned to a server during that time, the client is disconnected. 0 disables. If this is disabled, clients will be queued indefinitely. [seconds]
This setting is used to prevent unresponsive servers from grabbing up connections. It also helps when the server is down or rejects connections for any reason.
Default: 120
Most probably all the connections in the PostgreSQL connection pool are busy and your application fails to obtain one within the bounds of pre-defined timeout of 2 minutes.
The options are in:
Increase connection pool size
Increase the aforementioned timeout
Check Postgresql slow queries logs and execution plans for these queries
Test the database in isolation using JDBC Request sampler
Use a profiler tool like JProfiler or YourKit to see whether the long processing is somewhere in your application source code.

Related

Snowflake JDBC Connection using Talend

I am using tDBConnection(JDBC) component to connect with a snowflake.
After all the setup I am getting the below error
net.snowflake.client.jdbc.RestRequest execute
SEVERE: Stop retrying since elapsed time due to network issues has reached
timeout. Elapsed: 71,253(ms), timeout: 60,000(ms)
Exception in component tDBConnection_1 (sf_test)
java.lang.RuntimeException: JDBC driver encountered communication error. Message: Exception encountered for HTTP request: Certificate for <xxxxxxxxxx.ap-southeast-1.snowflakecomputing.com> doesn't match any of the subject alternative names: [*.ap-southeast-1.snowflakecomputing.com, *.global.snowflakecomputing.com, *.sg.ap-southeast-1.aws.snowflakecomputing.com].
at snowflake_poc.sf_test_0_1.sf_test.tDBConnection_1Process(sf_test.java:397)
at snowflake_poc.sf_test_0_1.sf_test.runJobInTOS(sf_test.java:700)
at snowflake_poc.sf_test_0_1.sf_test.main(sf_test.java:550)
I am using latest snowflake JDBC driver 3.12.2
Any leads would be really helpful
Thanks
I had the similar issue, in the Talend account box just give your account name alond which is "<xxxxxxxxxx.ap-southeast-1" don't postfix snowflakecomputing.com to your account name

Time out issue with CRM Online service object

I am working on MS D CRM Online V8.0. I have written a Windows Service that bulk updates records for an entity (500 record each time). I am facing a time out issue and authentication failure with the service object. We have set the time out to 10 mins.
Algorithm:
Fetch 500 Records for Entity
Update the same records. Set Status = In progress
Do the Process
Create the service object again
Update the records. Set Status = Complete.
I get the below exception
2018-03-05 09:36:04,267 [1] DEBUG -
System.ServiceModel.CommunicationException: The underlying connection
was closed: The connection was closed unexpectedly. --->
System.Net.WebException: The underlying connection was closed: The
connection was closed unexpectedly. at
System.Net.HttpWebRequest.GetResponse() at
System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
timeout) --- End of inner exception stack trace ---

Getting a Heartbeat message error in a TIBCO custom adapter

I am running a TIBCO custom adapter on an AS400 server , there was no issue in the starting but suddenly it started giving the below issue.
Could anyone tell what can i check to fix this issue
Server
AS400/i series`
2017-11-30 13:12:48,927 INFO
[com.eaton.icc.tibco.as400.adapter.AS400WisperReceiipt] - WisperReceipt send completed
2017-11-30 13:12:50,091 INFO
[com.eaton.icc.tibco.as400.adapter.AS400WisperPart]] - WisperPart send
completed
2017-11-30 13:12:50,091 WARN
[com.eaton.icc.tibco.as400.adapter.AS400WisperPart]] - Method pool()
completed successfully
2017-11-30 13:12:57,187 ERROR
[com.eaton.icc.tibco.as400.adapter.AS400Monitor] - Exception sending
heartbeat message
com.tibco.sdk.MException: Operation error: unable to create Tibrv Session
for PubHawkMonitor(MPublisher).
at com.tibco.sdk.events.pubsub.MRvPublisher.send(MRvPublisher.java:76)
at com.tibco.sdk.events.MPublisher.send(MPublisher.java:346)
at com.eaton.icc.tibco.as400.adapter.AS400Monitor.onEvent(AS400Monitor.java:227)
at com.tibco.sdk.events.EventHandoff.run(MEventSource.java:141)
at java.lang.Thread.run(Thread.java:809)
Check the RV parameters of adapter.
The adapter can noto able to start the rv. Please share the configuration of adapter

Connection refused: connect Aborting action - session using JMeter

I have 50 threads test in JMeter with multiple session but when I test it half of the threads is failed and I got this error Connection:
Response code: 500
Response message: Connection refused: connect Aborting action - session 656255658 was closed
Check 2 things:
are you sure you’re not reusing same session accross threads ? Are you correctly correlating the session id.
If issue only happens over some limit (not at 25 users for example, but at 50) then it’s a load issue or configuration limit on server side

Socket Exception : recv failed with oracle thin driver

I am facing an issue where my test suite randomly fails with an socket exception
oracle.jdbc.driver.T4CStatement 1267 - Throwing SQLException: java.net.SocketException: Software caused connection abort: recv failed
The test suite fails with this exception when a given set of test cases are executed in a particular order. I got the above error log after enabling the oracle jdbc driver logs. The query which leads to this error is always a "DROP SEQUENCE query". There is nothing special about this query since it is fired 'n' number of times during the execution flow.
One of the blog link points out that the above error is because the server side sockets gets closed before the client expects. To troubleshoot more on this point I tried analyzing the Oracle TNSListener logs - listener.log file but was not able to gather much information since the log file only contained information about the socket CONNECT function call.
What could be the possible causes of the above error in addition to the one the blog link mentions?
How can I configure the Oracle TNSListener to provide more detailed information about the socket communication? For e.g. Trace information when the server socket close event is fired.
I would appreciated if anyone could point out to a possible cause of this error or provide more information which could help me to troubleshoot this issue further based on the above two points
You can set the trace level if you have access to the lsnrctl utility:
LSNRCTL> show trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to off
The command completed successfully
LSNRCTL> set trc_level admin
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL> show trc_level
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx)(PORT=1521)))
LISTENER parameter "trc_level" set to admin
The command completed successfully
LSNRCTL>
From the docs, trc_level is one of:
Specify one of the following trace levels:
off for no trace output
user for user trace information
admin for administration trace information
support for Oracle Support Services trace information

Resources