-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New Session is started on each request #38964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
Hmm, I don't think it's related. This PR, prevent initializing the session_storage twice which does not have side effect for end user. I think the issue is more related to the log With 5.2 you can check in profiler what started the session, in previous version, I use |
The issue was about the redis configuration. |
This happens to me with 5.1, if I set It doesn't happen with |
I had |
I have exactly the same issue: @bastoune first you say
And then
🤔 My auth system is done with lexik_jwt_authentication so not linked to Session |
Could you please provide a reproducer? |
I have put
|
hmm.. In |
I mean the session has been started in this request because the request sent a cookie with an existing session (which has been initialized in a previous request). If you want to find what started the session previously, you have to clear your cookies (or open a private browsing tab) and retry the |
Okay my probleme is that my SessionAuthenticationStrategy is on migrate, probablie because of lexik_jwt_authentication. Thanks for the help anyway ! |
Sorry for this, The thing is that I solved it by changing the handler to a PdoSessionHandler so my guesses are : I still have an unresolved internal ticket to find the origin. |
Symfony version(s) affected: 4.4.16
Having an app running perfectly on my local with docker.
When I deploy it, I can't get why a new session is started on each request. It seems it can't come from the code since it's exactly the same.
The session is stored on a redis DB (I have the same bug if I use the filesystem session). It's there I can see all the new session created. (see last code block).
From the log I can clearly identify that the
$request->getSession()->getId()
changes on each request but not the PHPSESSID cookie.For example:
First request
Second one
KUBERNETES
ingress-nginx.yaml
Symfony APP
services.yaml
packages.framework.yaml
REDIS
VERSIONS:
The text was updated successfully, but these errors were encountered: