element-hq / element-hq/synapse

502 error when joining #sanely:matrix.org from matrix.org

Open
#19,900 1 comment 0 reactions 0 assignees View on GitHub
A-Join
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

POST to `https://matrix-client.matrix.org/_matrix/client/v3/join/%23sanely%3Amatrix.org?server_name=matrix.org&server_name=matrix.opencloud.lu&via=matrix.org&via=matrix.opencloud.lu`

### Steps to reproduce

- open https://app.element.io/
- type `/join #sanely:matrix.org`

### Homeserver

matrix.org

### Synapse Version

1.156.0rc1 (b=matrix-org-hotfixes-priv,16f6d95a09)

### Installation Method

I don't know

### Database

I don't know

### Workers

I don't know

### Platform

matrix.org

### Configuration

_No response_

### Relevant log output

```shell
{"type":"https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-502/","title":"Error 502: Bad gateway","status":502,"detail":"The origin web server returned an invalid or incomplete response to Cloudflare. This typically indicates the origin is overloaded or misconfigured.","instance":"a13eaba2480eeedf","error_code":502,"error_name":"origin_bad_gateway","error_category":"origin","ray_id":"a13eaba2480eeedf","timestamp":"2026-06-30T16:50:31Z","zone":"matrix-client.matrix.org","cloudflare_error":true,"retryable":true,"retry_after":60,"owner_action_required":true,"what_you_should_do":"**Wait and retry.** Back off for at least 60 seconds. If the error persists, the website operator should check their origin server health and configuration.","footer":"This error was generated by Cloudflare on behalf of the website owner."}
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the `/join #sanely:matrix.org` flow in Element or the reported Matrix client POST endpoint, then inspect the origin-side response and relevant Synapse logs around the 502. Done means joining `#sanely:matrix.org` succeeds without a Cloudflare 502; the issue does not identify a Synapse file or test to begin with.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.