4.Locust运行脚本报错urllib3.connectionpool: Connection pool is full, discarding connection: 192.xxx.x.xxxx

解决方法:

经确认compute容器下默认的连接池参数“DEFAULT_POOLSIZE”是10,可以修改为1000。该参数需要固化。

配置文件的路径为:/usr/lib/python3.8/site-packages/requests/adapters.py  

from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
                         ProxyError, RetryError)
from .auth import _basic_auth_str

DEFAULT_POOLBLOCK = False
DEFAULT_POOLSIZE = 1000
DEFAULT_RETRIES = 0


class BaseAdapter(object):

 

你可能感兴趣的:(Locust性能测试)