forked-synapse/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 Remove HomeServer.get_datastore() (#12031) 2022-02-23 11:04:02 +00:00
key Use servlets for /key/ endpoints. (#14229) 2022-10-20 11:32:47 -04:00
media Unescape HTML entities in oEmbed titles. (#14781) 2023-01-09 14:22:02 +00:00
synapse Support OIDC backchannel logouts (#11414) 2022-10-31 13:07:30 -04:00
__init__.py Use ClientRestResource on both the main process and workers. (#14528) 2022-12-02 13:10:05 -05:00
health.py Add missing type hints to non-client REST servlets. (#10817) 2021-09-15 08:45:32 -04:00
models.py Use Pydantic to systematically validate a first batch of endpoints in synapse.rest.client.account. (#13188) 2022-08-15 19:05:57 +00:00
well_known.py Implementation of HTTP 307 response for MSC3886 POST endpoint (#14018) 2022-10-18 15:52:25 +00:00