I'm requesting a long-running forcemerge (usually 1-2 hours) via Python. The issue is that even when I specify a long timeout, the Python HTTP request blocks indefinitely, even after the merge tasks finish on the ES cluster. I've tried multiple methods of making the request from Python including Curator, the Elasticsearch Python API, direct urllib3 calls, and the requests library. When I initiate the forcemerge from cURL the command returns correctly once the tasks complete on ES.
Has anyone else had issues like this? Are people initiating forcemerge operations of this duration from Python successfully? Can you think of other things to try to troubleshoot/diagnose the problem?
I'm running Elasticsearch 5.6 and Python 3.6