Closed green3g closed 7 months ago
Same problem here. 👎
I think is's a concurrency problem. Sovled by switching to flask's build-in session.
This is quite old but if anyone can provide a reproduction it can be checked. I suspect this is high concurrency issues with FileSystem. Generally Flask-Session is not designed for high competition concurrency sessions. Open to PRs for such things as locks or watch on backends, they may be best in a different package or somehow be configurable
I'm running flask-session with flask-login with the following versions:
The user gets authenticated via a user loader function and a few requests work well. But after maybe 3 to 5 page reloads, suddenly the user is logged out and subsequent requests are not authenticated.
In the session file, user_id still exists, but the other session values, like my custom
session['server_token']
are getting cleared for some reason. Also, it always happens on an api request afaik to flask-restless. Eventually one request raises a ProcessingException whencurrent_user.is_authenticated
is false and then subsequent requests fail.For config settings I'm using this:
I'd appreciate any direction someone might have for debugging this.