How to check and set up the Couchbase timeout using the Python SDK?

Question:

I’m searching a way how to check the current value of Couchbase cluster timeout, and how to set up a desired timeout using the Python SDK.

I know the method to set up a timeout using ClusterTimeoutOptions but it doesn’t work.

There are no problems with timeouts if I disable it using couchbase-cli:
couchbase-cli setting-query –set –timeout -1

Asked By: slazur83

||

Answers:

I resolve it and it works as I expected. I converted cURL commands which I found at the Couchbase documentation website to Python’s requests, and I was able to check timeout and update it.

To check:
requests.get('http://localhost:8093/admin/settings', auth=(user, password))

To update:
requests.post('http://localhost:8091/settings/querySettings', headers=headers, data=data, auth=(user, password))

Answered By: slazur83
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.