I'm not entirely clear how or why this started or continued but, from what I can tell, going back to the first instance of the error in Sentry for my website...
It's possible it's related to several of the links being from my website to other posts on my site (or #anchor
links to the same page (#32)) and so the server is coping with both opening outgoing connections and handling the incoming ones - maybe if something's slow it uses up its connections and so everything gets even slower, etc, etc.
Anyway. Here's the traceback from the first time it happened:
TimeoutError: [Errno 110] Connection timed out
File "urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "urllib3/util/connection.py", line 95, in create_connection
raise err
File "urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f05e0f6a940>: Failed to establish a new connection: [Errno 110] Connection timed out
File "urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "urllib3/connectionpool.py", line 1040, in _validate_conn
conn.connect()
File "urllib3/connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
MaxRetryError: HTTPSConnectionPool(host='www.gyford.com', port=9494): Max retries exceeded with url: /webmentions/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f05e0f6a940>: Failed to establish a new connection: [Errno 110] Connection timed out'))
File "requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
ConnectionError: HTTPSConnectionPool(host='www.gyford.com', port=9494): Max retries exceeded with url: /webmentions/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f05e0f6a940>: Failed to establish a new connection: [Errno 110] Connection timed out'))
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "django/core/management/__init__.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "django/core/management/base.py", line 414, in run_from_argv
self.execute(*args, **cmd_options)
File "django/core/management/base.py", line 460, in execute
output = self.handle(*args, **options)
File "mentions/management/commands/pending_mentions.py", line 28, in handle
handle_pending_webmentions(incoming=incoming, outgoing=outgoing)
File "mentions/tasks/scheduling.py", line 66, in handle_pending_webmentions
process_outgoing_webmentions(wm.absolute_url, wm.text)
File "mentions/util.py", line 46, in __call__
return func(*args, **kwargs)
File "mentions/tasks/outgoing_webmentions.py", line 82, in process_outgoing_webmentions
result = _process_link(source_urlpath, link_url)
File "mentions/tasks/outgoing_webmentions.py", line 145, in _process_link
success, status_code = _send_webmention(source_urlpath, endpoint, link_url)
File "mentions/tasks/outgoing_webmentions.py", line 237, in _send_webmention
response = requests.post(endpoint, data=payload)
File "requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "requests/adapters.py", line 519, in send
raise ConnectionError(e, request=request)
And here's the "breadcrumbs" from Sentry (updated to correct image since I first posted this):