urllib3 Connection pool-连接池已满,正在放弃连接

2024-10-05 12:24:40 发布

您现在位置:Python中文网/ 问答频道 /正文

看到

urllib3.connectionpool WARNING - Connection pool is full, discarding connection

意味着我正在有效地丢失数据(因为丢失了连接)

这是否意味着连接已断开(因为池已满);但是,稍后当连接池可用时,将重新尝试相同的连接?


Tags: 数据isconnectionfullpoolwarningurllib3connectionpool
1条回答
网友
1楼 · 发布于 2024-10-05 12:24:40

Does it mean that connection is dropped (because pool is full); however, the same connection will be re-tried later on when connection pool becomes available?

^这是正确的解释。如果你能为那条信息想出更清晰的措词,请用这个建议提出一个问题!

由于urllib3池管理器重用连接,它将限制每个主机在任何给定时间允许的连接数,以避免累积太多未使用的套接字。如果您依赖于并发性,那么最好将大小增加到您正在使用的线程数,以便每个线程有效地获得自己的连接。

这里有更多细节:https://urllib3.readthedocs.io/en/latest/advanced-usage.html#customizing-pool-behavior

相关问题 更多 >

    热门问题