[Errno 8] nodename nor servname provided, or not known

python2.7
gevent
Use the GEvent coroutine to initiate an HTTP request
Using python’s own standard DNS library,
Frequent errors
[Errno 8] nodename nor servname provided, or not known
Check some articles, DNS resolution is a problem with a lot of concurrency.
Solution: Instead of using Python’s DNS resolution standard library, use gEvent’s built-in DNS resolution module to replace the standard library.
(When the following patch_all() is implemented, GEvent will help us replace a series of standard libraries.)
 

from gevent import monkey;monkey.patch_all()

 
 
At this point, [Errno 8] Nodename Nor Servname provided, or Not known issues only happen the first time DNS is resolved, only once.
 

Read More: