urllib3 connectionpool - Connection pool is full, discarding connection

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 04:03:33

问题


does seeing the

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

mean that I am effectively loosing data (because of lost connection)
OR
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?


回答1:


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?

^ This is the correct interpretation. If you can think of clearer phrasing for that message, please do open an issue with the suggestion!

Because a urllib3 PoolManager reuses connections, it will limit how many connections are allowed per host at any given time to avoid accumulating too many unused sockets. If you're relying on concurrency, it could be a good idea to increase the size to the number of threads you're using so that each thread effectively gets its own connection.

More details here: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#customizing-pool-behavior



来源:https://stackoverflow.com/questions/53765366/urllib3-connectionpool-connection-pool-is-full-discarding-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!