python写客户端发送请求失败_python客户端请求失败,默认timeou

从python客户机到elasticsearch的以下请求失败2014-12-19 13:39:05,429 WARNING GET http://10.129.0.53:9200/delivery-logs-index.prod-20141218/_search?timeout=20m [status:N/A request:10.010s]

Traceback (most recent call last):

File "/usr/lib/python2.6/site-packages/elasticsearch/connection/http_urllib3.py", line 46, in perform_request

response = self.pool.urlopen(method, url, body, retries=False, headers=headers, **kw)

File "/usr/lib/python2.6/site-packages/urllib3/connectionpool.py", line 559, in urlopen

_pool=self, _stacktrace=stacktrace)

File "/usr/lib/python2.6/site-packages/urllib3/util/retry.py", line 223, in increment

raise six.reraise(type(error), error, _stacktrace)

File "/usr/lib/python2.6/site-packages/urllib3/connectionpool.py", line 516, in urlopen

body=body, headers=headers)

File "/usr/lib/python2.6/site-packages/urllib3/connectionpool.py", line 336, in _make_request

self, url, "Read timed out. (read timeout=%s)" % read_timeout)

ReadTimeoutError: HTTPConnectionPool(host=u'10.129.0.53', port=9200): Read timed out. (read timeout=10)

Elasticsearch([es_host],

sniff_on_start=True,

max_retries=100,

retry_on_timeout=True,

sniff_on_connection_fail=True,

sniff_timeout=1000)

有没有办法增加请求超时?目前,它似乎被默认配置为读取timeout=10

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值