Back

Update session error, No session found , Rate limit exceed

  • 0
  • Web
Raunak πŸ˜—
19 Aug, 2024, 11:00

Hey I am new to appwrite , I am trying to fix this issue of empty refresh tokens (#5987) when we call account.updateSession. But I am not able to reproduce this issue as upon calling account.updateSession it give me this error.

No session found ...

Is it because I am calling get session and update session too frequently??

Help would be appreciated, thanks

TL;DR
Developers discussing a session error and rate limit exceed issue when calling `account.updateSession()`. To fix the "No session found" error, do not call the update session too frequently. To temporarily disable rate limits in development, set `_APP_OPTIONS_ABUSE=disabled` in the `.env` file.
Ibaraki Douji
19 Aug, 2024, 11:16

on what i can see you are in fact asking too much time the sessions

you shouln't have a loop that request appwrite session everytime

you can get the session once, and check the session expiration from the getSession function for example

Ibaraki Douji
19 Aug, 2024, 11:18

when you get 429 the server block your requests for a certain time (you can see that in the response headers) and because you did too much request to the server/endpoint

ideclon
19 Aug, 2024, 11:54

The accounts.updateSession() endpoint has a rate limit of 10 requests per 60 minutes.

ideclon
19 Aug, 2024, 11:55

Ah, are you trying to take on the issue?

ideclon
19 Aug, 2024, 11:55

I see there’s currently no-one assigned to it

Raunak πŸ˜—
19 Aug, 2024, 11:56

Yeah , I am working on it.

ideclon
19 Aug, 2024, 11:56

Ok - so for development, on a local version of Appwrite, you can disable the rate limits

Raunak πŸ˜—
19 Aug, 2024, 11:57

How can I disable it?

ideclon
19 Aug, 2024, 11:57

I cannot stress this enough - do not do this in production

ideclon
19 Aug, 2024, 11:57

In the .env file, set _APP_OPTIONS_ABUSE=disabled

Raunak πŸ˜—
19 Aug, 2024, 11:58

Ok thanks , i will check it out

ideclon
19 Aug, 2024, 11:58

Feel free to come back here and ping me if you have any further questions!

Raunak πŸ˜—
19 Aug, 2024, 11:58

Okiee πŸ‘

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more