wait_for_connection silently hangs for 60s

Open
#60 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Start at the wait_for_connection entry point and trace the six connection attempts shown by the startup log. Check how failures are handled during the 60-second wait, then make the failure reason visible in logs and verify that a failed connection no longer appears to hang.

Written by the indexing model from the issue text.

Description

It takes 60 seconds to connect to the HS in wait_for_connection, which suggests it's failed 6 times to do so. However, there doesn't appear to be any logs explaining why it's failed to connect so it looks like a hang. The bridge generally seems to work afterwards, so wondering if I am forgetting something.

[2021-11-01 15:29:44,139] [INFO@mau.init] Initialization complete in 0.59 seconds
[2021-11-01 15:29:44,140] [DEBUG@mau.init] Running startup actions...
[2021-11-01 15:29:44,140] [DEBUG@mau.init] Starting appservice...
[2021-11-01 15:29:44,140] [DEBUG@mau.as] Starting appservice web server on 0.0.0.0:29317
[2021-11-01 15:29:44,141] [INFO@mau.mx] Ensuring connectivity to homeserver
[2021-11-01 15:30:45,131] [DEBUG@mau.user.@foo:bar] Starting client due to ensure_started(even_if_no_session=False)
``
Dominant language
Python
Stars
249
Forks
84
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mautrix/python

All issues in mautrix/python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.