elabx Posted July 31, 2024 Posted July 31, 2024 Hi! Just want to check if anyone has come across this: I have this random scenario in which apparently the session variable is not set when a second instance is getting initialized: This seems to occur when the modules are getting loaded by the ModulesLoader, this is the last bit of the stacktrace being the last item the point where the second instance is instantiated: It happens randomly so not sure if I might be facing a load issue on the server? That is not allowing sessions to be initialized? Although I don't see anything in the Session class code or ProcessWire class code that would stop the variable from being available. @kixe I saw you struggling on the Github issues with multi instance haha so I'm just tagging you try my luck if you might have any experience with something similar. Both instances are running the same PW version and using file Session handler.
BitPoet Posted August 1, 2024 Posted August 1, 2024 Did you set $config->sessionName to different values?
elabx Posted August 1, 2024 Author Posted August 1, 2024 2 hours ago, BitPoet said: Did you set $config->sessionName to different values? Will try this right away!
cwsoft Posted August 1, 2024 Posted August 1, 2024 (edited) 9 hours ago, BitPoet said: Did you set $config->sessionName to different values? Had a similar issue with a local/live site where changing the session name to different names fixed the issues I had. However don‘t use special chars in the session name. Had issues with a - or . inside my session name, which caused weired issues, not easy to spot. Removing those chars and clearing session cache resolved the issues I had. Issue occured on last stable master and using PW $session API to check for logged in frontend users. Edited August 1, 2024 by cwsoft
PatrickAdkins Posted September 12, 2024 Posted September 12, 2024 On 8/1/2024 at 4:06 PM, BitPoet said: Did you set $config->sessionName to different values? Have you tried it?
elabx Posted September 12, 2024 Author Posted September 12, 2024 1 hour ago, PatrickAdkins said: Have you tried it? Yep, no success.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now