Python connection timing out


We are using the python library to index documents into ES and sometimes we get the following error:

elasticsearch.exceptions.ConnectionTimeout: ConnectionTimeout caused by - ReadTimeoutError(HTTPConnectionPool(host='localhost', port=9200): Read timed out. (read timeout=10))

The connection with python we use is:

es.index(index="lcm_db", doc_type='host', body=document, timeout='20s')

So not sure why it times out with 10 when we are specifying 20s, I guess I'm missing something very simple, but can't think what it is.
Any ideas?


I also got this error. But only when I want to index or update.