Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

429 responses are cached #1801

Closed
lukebarnard1 opened this issue Jan 11, 2017 · 3 comments
Closed

429 responses are cached #1801

lukebarnard1 opened this issue Jan 11, 2017 · 3 comments

Comments

@lukebarnard1
Copy link
Contributor

lukebarnard1 commented Jan 11, 2017

Requests/responses such as

warn: matrix-appservice-bridge [-] PUT http://localhost:8080/_matrix/client/r0/rooms/!mhAdlVvCyQdKdmuIlm%3Alocalhost%3A8480/send/m.room.message/m1484159120283.7 (@_twitter_1344951:localhost:8480) HTTP 429 Error: {"errcode":"M_LIMIT_EXCEEDED","error":"Too Many Requests","retry_after_ms":1480}

have been observed running the twitter bridge against a local synapse. These appear to by cached responses and despite the js-sdk retrying after the given number of retry_after_ms, what appears to be a cached response.

It would be best not to cache these so that the js-sdk doesn't retry for as long as the request is cached.

@ara4n
Copy link
Member

ara4n commented Jan 11, 2017

It looks like the HttpTransactionCache layer is blindly caching HTTP responses for 30-60mins regardless of whether they are error codes or not. @erikjohnston / @NegativeMjark is this deliberate?

@kegsay
Copy link
Member

kegsay commented Jan 11, 2017

Most likely not. I touched it last to convert it to using ObservableDeferreds. We should be doing rate limit checks well before then but I guess we don't.

@kegsay
Copy link
Member

kegsay commented Feb 13, 2017

I have fixed this: #1913

@kegsay kegsay closed this as completed Feb 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants