How to raise timeout threshold in Python SDK for analytics_query

Ok, I found documentation about making the setting cluster wide: Client Settings | Couchbase Docs

Am trying it out, will update.

UPDATE…

No it did not work. Also the docs only mention it affecting N1QL queries and also that the cluster wide setting shouldn’t be messed with usually but overridden by per query setting.

So back to the original issue: Please help.

OK, hmm, unfortunately there may be something deeper going on here.

Noting that other SDKs do provide a timeout param for the Analytics query. I tried it out with node sdk.

Am seeing the same behavior and setting the timeout override doesn’t help.

I am seeing this in the node docs:>

Server Side Timeout , customizes the timeout sent to the server. Does not usually have to be set, as the client sets it based on the timeout on the operation. Uses the timeout option, and defaults to the Analytics timeout set on the client (75s). This can be adjusted at the cluster global config level.

I seem to be running up against the 75 second client side timeout

How do I change this magical Analytics client side timeout?

So the docs seem to say this is done by passing a ClusterTimeoutOptions into ClusterOptions.

Also this isn’t working. Here is my code:

from couchbase.bucket import Bucket

from couchbase.cluster import Cluster, ClusterOptions, AnalyticsOptions, ClusterTimeoutOptions

from couchbase_core.cluster import PasswordAuthenticator

timeoutOptions = ClusterTimeoutOptions(query_timeout=timedelta(seconds=700), kv_timeout=timedelta(seconds=700))

from couchbase.exceptions import CouchbaseException

options = ClusterOptions(PasswordAuthenticator('username', 'password'), timeout_options=timeoutOptions)

cluster = Cluster.connect('couchbase://{}'.format('...'), options)

query1 = "..."

result = cluster.analytics_query(query1)