title: How to mute user timeout message in scrapy?
body: <p>Every time a timeout out occurred, there would be such a message</p>
  
  <pre><code>User timeout caused connection failure. Getting https://some.website/1 took longer than 15.0 seconds...
  User timeout caused connection failure. Getting https://some.website/2 took longer than 15.0 seconds...
  User timeout caused connection failure. Getting https://some.website/3 took longer than 15.0 seconds...
  User timeout caused connection failure. Getting https://some.website/4 took longer than 15.0 seconds...
  </code></pre>
  
  <p>which I don't want to log into my log file.</p>
  
  <p>How can I mute this?</p>
  
  <hr>
  
  <p>I am pretty sure that the message comes from <code>twisted.internet.error</code>, in the source code I found this:</p>
  
  <pre class="lang-py prettyprint-override"><code>class TimeoutError(UserError):
      """User timeout caused connection failure"""
  </code></pre>
  
  <p>And I tried using <code>errback</code> to catch the error, according to the <a href="https://docs.scrapy.org/en/latest/topics/request-response.html#topics-request-response-ref-errbacks" rel="nofollow noreferrer">scrapy doc</a>, but somehow it doesn't work.
  my error handle method:</p>
  
  <pre class="lang-py prettyprint-override"><code>def handle_error(self, failure):
      if failure.check(TimeoutError):
          self.log("TimeoutError")
      else:
          self.log(failure.message)
  </code></pre>
  
  <hr>
  
  <p>Finally I found which piece of code raises this error, it is not the RetryMiddleware, it is my own proxy middleware, where I wrote:</p>
  
  <pre class="lang-py prettyprint-override"><code>def process_exception(self, request, exception, spider):
      self.logger.error(exception)
      return request
  </code></pre>
  
  <p>so I guess this is why the error won't even reach the spider <code>errback</code> callback method, my middleware caught it and logged the message over and over again.</p>