Permanent 'Temporary failure in name resolution' after running for a number of hours

后端 未结 2 847
故里飘歌
故里飘歌 2020-12-15 06:21

After running for a number of hours on Linux, my Python 2.6 program that uses urllib2, httplib and threads, starts raising this error for every request:

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-15 06:53

    This was caused by a library's failure to close connections, leading to a large number of connections stuck in a CLOSE_WAIT state. Eventually this causes the 'Temporary failure in name resolution' error due to resource exhaustion.

提交回复
热议问题