element-hq / element-hq/synapse
Media worker accumulates over 1000 connections to mega.nz
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#15440](https://github.com/matrix-org/synapse/issues/15440).
---
### Description
Our homeserver is accumulating connections to mega.nz (31.216.145.5) at a rate of approximately 2 per hour, most likely corresponding to URL preview requests for mega.nz. The largest amount I've seen is 1025 connections, spanning two media_worker instances.
### Steps to reproduce
- Request a moderate amount of mega.nz url previews over a long period of time
- Observe the effect on the server via e.g. `netstat -an | grep 31.216.145.5`
I am observing the same https connections being open from 10 hours ago, as well as additional new ones opening.
The URL preview requests complete as expected, but the https connections are never closed, and new ones are slowly added over time.
I would expect that at some point the connections would be closed, rather than being staying open indefinitely.
### Homeserver
another homeserver
### Synapse Version
1.81
### Installation Method
Debian packages from packages.matrix.org
### Database
PostgreSQL
### Workers
Multiple workers
### Platform
lxc container with no outgoing http proxy configured for url previews
### Configuration
_No response_
### Relevant log output
```shell
-
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.