filamoon / pyapollo

Python client for Ctrip's Apollo.
Apache License 2.0
193 stars 94 forks source link

每次都会超时,如何获取配置之后直接关闭连接,不需要变更通知 #11

Open anyujie999 opened 5 years ago

anyujie999 commented 5 years ago

代码: def test_apollo(): client = pyapollo.ApolloClient(app_id='pubtrans-analysis', cluster='default', config_server_url='http://192.168.110.24:8080', timeout=60) client.start() zookeeper = client.get_value('zookeeper', 'default_value') print zookeeper client.stop() 配置能获取到,但是过一会儿就会报错,具体内容如下 ReadTimeout: HTTPConnectionPool(host='192.168.110.24', port=8080): Read timed out. (read timeout=60)

shen270820227 commented 5 years ago

异步,start(use_eventlet=True,eventlet_monkey_patch=True)

tbchj commented 5 years ago

@shen270820227 生效了,我的出现上述问题后,加上 start(use_eventlet=True,eventlet_monkey_patch=True) 已经好了,但是动态还是无法获取配置

tudou123456 commented 4 years ago

用了start(use_eventlet=True,eventlet_monkey_patch=True) 还是会报WARNING - HTTPConnectionPool(host='config-test-meta.taimei.com', port=80): Read timed out. (read timeout=30)