MatrixSynapse/synapse/rest
Sean Quah 772e8c2385
Fix stack overflow in `_PerHostRatelimiter` due to synchronous requests (#14812)
When there are many synchronous requests waiting on a
`_PerHostRatelimiter`, each request will be started recursively just
after the previous request has completed. Under the right conditions,
this leads to stack exhaustion.

A common way for requests to become synchronous is when the remote
client disconnects early, because the homeserver is overloaded and slow
to respond.

Avoid stack exhaustion under these conditions by deferring subsequent
requests until the next reactor tick.

Fixes #14480.

Signed-off-by: Sean Quah <seanq@matrix.org>
2023-01-13 00:16:21 +00:00
..
admin Move `StateFilter` to `synapse.types` (#14668) 2022-12-12 16:19:30 +00:00
client Fix stack overflow in `_PerHostRatelimiter` due to synchronous requests (#14812) 2023-01-13 00:16:21 +00:00
consent
key
media Unescape HTML entities in oEmbed titles. (#14781) 2023-01-09 14:22:02 +00:00
synapse
__init__.py Use ClientRestResource on both the main process and workers. (#14528) 2022-12-02 13:10:05 -05:00
health.py
models.py
well_known.py