Query by python multiprocessing Pool.map, when the number of query tables is 10000, the program freezes.
Bug Description 使用python的多进程库multiprocessing的Pool.map执行并行查询,当查询表数量为10000时,程序卡死
To Reproduce Steps to reproduce the behavior: 1.前置条件: 预先生成100000张表,并在每个表里插入1条数据;
- 代码示例: import taos import sys import datetime import random from multiprocessing import Pool
def query(i): try: conn1 = taos.connect(host="127.0.0.1", user="root", password="taosdata", config="/etc/taos") c1 = conn1.cursor() c1.execute('use db6') c1.execute('select * from db6.t%d' %(i)) conn1.close() except Exception as err: conn1.close() raise(err) if name == 'main': # use database try: c1.execute('use db6') except Exception as err: conn.close() raise(err) # query data and return data in the form of list try: pool = Pool(5) pool.map(query, range(8000)) pool.close() pool.join() except Exception as err: raise(err) 3. 执行python程序进行查询测试 4. 出现卡死
Expected Behavior 正常结束
Screenshots If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
- OS: Ubuntu 16.04 server
- 16GB, i5 8600 3.10GHZ, 1T SSD
- TDengine Version [ 2.0.3.1]
Additional Context 无
补充log信息: 09/17 16:13:34.994738 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:35.999754 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:36.179589 0x7f6e197c5700 DND 0x7f6e5c16c980, msg:heartbeat will be processed in mread queue 09/17 16:13:37.004733 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:37.684656 0x7f6e77ff7700 DND 0x7f6e5c16c980, msg:heartbeat will be processed in mread queue 09/17 16:13:38.009670 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:39.014637 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:39.189662 0x7f6e777f6700 DND 0x7f6e5c16c980, msg:heartbeat will be processed in mread queue 09/17 16:13:40.019678 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:40.694681 0x7f6e197c5700 DND 0x7f6e5c16c980, msg:heartbeat will be processed in mread queue 09/17 16:13:41.024695 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:42.029722 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:42.199700 0x7f6e77ff7700 DND 0x7f6e5c16c980, msg:heartbeat will be processed in mread queue 09/17 16:13:43.034708 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:43.704600 0x7f6e777f6700 DND 0x7f6e5c16c980, msg:heartbeat will be processed in mread queue 09/17 16:13:44.039699 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:45.044629 0x7f6e18fc4700 DND msg:status will be processed in mpeer queue 09/17 16:13:45.209685 0x7f6e197c5700 DND 0x7f6e5c16c980, msg:heartbeat will be processed
查询表数量小的时候有问题吗
@yihaoDeng 5000张表以下,貌似没有问题。没有明确的临界值,这个也是必现的
This issue is stale because it has been open for 30 days with no activity.