title: Python urlopen IOError: [Errno socket error] [Errno 10060]
body: <p>I'm looking to get more information about <code>IOError: [Errno socket error] [Errno 10060]</code> when using <em>urlopen</em> in Python 2.7. I am using my personal 35MB/s Internet connection (no proxy).</p>
  
  <p>I've been opening multiple webpages from various websites using a Python script and randomly get this error message from time to time:</p>
  
  <pre><code>webpage = urlopen('http://www.thewebpage.com')
  
  
  IOError: [Errno socket error] [Errno 10060] A connection attempt
  failed because the connected party did not properly respond after a
  period of time, or established connection failed because connected
  host has failed to respond
  </code></pre>
  
  <p>This error appeared after trying to open pages from different websites. Therefore, it doesn't seem to be related exclusively to the opening of pages from one particular website. I also got this error using <em>mechanize</em>. </p>
  
  <p>My questions are :</p>
  
  <ol>
  <li>Is this error related to the fact that I am sending multiple requests to the same server within a short amount of time? Would a time-out reduces the chance of getting this error?</li>
  <li>Is there any way to prevent it? Could I use a conditional statement to prevent the script from crashing?</li>
  </ol>
  
  <p>My script takes around an hour to run and having to rerun it due to this error is fairly unpleasant. </p>