All Apps and Add-ons

Splunk DB Connect: How to resolve dbxquery error "Failed to run query... Connection is not available, request timed out after 30000ms"

Path Finder

Whenever I try to execute the query in Splunk DB Connect (Data Input), I get the below error:

External search command 'dbxquery' returned error code 1. Script output = "RuntimeError: Failed to run query: "(select * from ocs_admin.tp_customerorder where plandate between sysdate-5 and sysdate and ticketnumber is not null)", params: "None", caused by: Exception(' java.sql.SQLTransientConnectionException: ocsdprd_splunk_srv - Connection is not available, request timed out after 30000ms..',). "

Is there a way to fix this?

Path Finder

For what it's worth, I see this in DB Connect 2.4.0 as well, either running saved searches or ad-hoc searches. The problem is intermittent and the same query runs in less than 10 seconds in SQL Studio.

0 Karma


Try updating to DB Connect 2 version 2.4.0. I was running DB Connect 2 version 2.3.4. I was getting the same error of a 30 second timeout until I upgraded to version 2.4.0. Now the query works fine and I don't see the 30 second timeout.

I was also get this 30000ms timeout message in my dbx2.log for cronned Splunk DB searches. The query would work fine in the DB Connect, Search tab, but it wouldn't work as a cronned search. I would get a blank email with no query results and I would see the 30000ms timeout in the dbx2.log. The fix was adding "maxWaitMillis = 60000" in the /etc/apps/splunk_app_db_connect/local/db_connections.conf to the specific DB connection you are trying to run it on.


Hello. i increased maxWaitMillis = 180000 and Db connect version is 3.4.2. Still i am getting the same error for oracle servers only.

error message:

ERROR com.splunk.dbx.connector.ConnectorFactory - action=failed_to_load_get_connection error=unnamed_pool_-131xxx5723_jdbc__oracle__thin__@server_name - Connection is not available, request timed out after 180000ms.

0 Karma


We were on 2.3.1 and had a lot of the connection timeout errors. The upgrade to 2.4 was the fix !!

0 Karma

Esteemed Legend

You should click Accept to close the question.

0 Karma

Path Finder

I noticed that splunk is refusing to connect to the database many times.
Sometime the query works and sometime it does not.
Not sure what is going wrong.

0 Karma


Your connection is timing out after 30 seconds. I don't know a way to change the timeout setting so I suggest you look at ways to reduce the query time.
Are there any errors reported on the other end?

If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...