'Timeout callback of request.
Construct a timeout HTTPResponse when a timeout occurs.
:arg object key: A simple object to mark the request.
:info string key: More detailed timeout information.'

def _on_timeout(self, key, info=None):

    (request, callback, timeout_handle) = self.waiting[key]
    self.queue.remove((key, request, callback))
    error_message = ('Timeout    {0}'.format(info) if info else 'Timeout')
    timeout_response = HTTPResponse(request, 599, error=HTTPError(599, error_message), request_time=(self.io_loop.time() - request.start_time))
    self.io_loop.add_callback(callback, timeout_response)
    del self.waiting[key]
