Repeated host lookups failing in urllib2

后端 未结 1 1636
离开以前
离开以前 2021-01-16 20:36

I have code which issues many HTTP GET requests using Python\'s urllib2, in several threads, writing the responses into files (one per thread).
During execution, it look

相关标签:
1条回答
  • 2021-01-16 21:20

    This is not a Python problem, on Linux systems make sure nscd (Name Service Cache Daemon) is actually running.

    UPDATE: And looking at your code you are never calling page.close() hence leaking sockets.

    0 讨论(0)
提交回复
热议问题