【发布时间】:2018-10-25 21:18:47
【问题描述】:
我尝试使用 influxDB 来保存一些监控数据。我用默认配置启动了influxDB,并使用python在我自己的mac中通过HTTP API编写了一些测试数据,一开始一切都很顺利。但是我每次写一些数据后都会遇到 ConnectionError 。我的测试代码是
for event_id in xrange(0, 100000):
requests.post("http://127.0.0.1:8086/write?db=mydb", data="test_a,event={0} value=100 1538841600000000000".format(event_id))
大约执行16300次后,会报错。
HTTPConnectionPool(host='127.0.0.1', port=8086): Max retries exceeded with url: /write?db=mydb (Caused by NewConnectionError("<urllib3.connection.HTTPConnection object at 0x110a5fb10>: Failed to establish a new connection: [Errno 49] Can't assign requested address",)
然后,我应该在写入新数据之前等待大约 2 秒。
我的操作系统是 MacOS 10.14,所有数据都保存在 HDD 硬盘中。
influxDB 版本为 vv1.6.4 (git: master c75cdfdfa6f71a08473fefcec71f6cbcbdef1ff4)
influxDB 正在整理吗?
【问题讨论】:
标签: influxdb