pyapollo icon indicating copy to clipboard operation
pyapollo copied to clipboard

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

Open anyujie999 opened this issue 7 years ago • 3 comments

代码: 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)

anyujie999 avatar Dec 26 '18 07:12 anyujie999

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

shen270820227 avatar Feb 12 '19 02:02 shen270820227

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

tbchj avatar Mar 13 '19 08:03 tbchj

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

tudou123456 avatar May 08 '20 07:05 tudou123456