element-hq / element-hq/synapse
Synapse completely hangs every few minutes, when configured with an IPv6 DNS server but no IPv6 network
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 46
Description
This issue has been migrated from [#2395](https://github.com/matrix-org/synapse/issues/2395).
---
Summary:
Since 0.22 synapse hangs and crashes so often it has become mostly unusable.
Steps to Reproduce:
Run synapse 0.22 on FreeBSD 11.0p11. Wait a few minutes on a server with exactly two user accounts, federated with matrix.org. Synapse hangs and Riot clients show that it has lost connection to the server.
Then trying to restart synapse with synctl or service(8) it tells me it's waiting for PID . It's waiting forever for synapse to quit. I must kill -9 the process before I can restart the service again.
Expected Results:
synapse shouldn't hang/crash multiple times a day. At least it should cleanly restart when told to.
Actual Results:
synapse hangs, often after a few seconds/minutes. Trying to restart it doesn't work, since it waits forever for the process to quit. Manual kill -9 works. (Yes, -9 is necessary to successfully terminate the process.)
Fully restarting the FreeBSD jail works as well.
Regression:
Synapse was a lot more stable with 0.18, 0.19. With 0.21 it became crashy, requiring restarts most days. With 0.22 it crashes multiple times a day, sometimes only lasting 30s before it hangs.
Automatically restarting synapse with a cron job doesn't work either since it never finishes to terminate. Having a kill -9 in a cron job is unacceptably ugly and must not be necessary to keep a daemon running smoothly. (Especially with next to no load at all. TWO (in numbers, 2) user accounts on that server.)
Notes:
I *suspect* this to be related to low-memory conditions, but cannot tell for sure.
Are there any logs I should reproduce here to aid tracking down the problem? If so, which ones?
Contributor guide
Assessment
This issue has not been assessed yet.