elabx Posted July 31 Share Posted July 31 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. Link to comment Share on other sites More sharing options...
BitPoet Posted August 1 Share Posted August 1 Did you set $config->sessionName to different values? Link to comment Share on other sites More sharing options...
elabx Posted August 1 Author Share Posted August 1 2 hours ago, BitPoet said: Did you set $config->sessionName to different values? Will try this right away! Link to comment Share on other sites More sharing options...
cwsoft Posted August 1 Share Posted August 1 (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 by cwsoft Link to comment Share on other sites More sharing options...
PatrickAdkins Posted September 12 Share Posted September 12 On 8/1/2024 at 4:06 PM, BitPoet said: Did you set $config->sessionName to different values? Have you tried it? Link to comment Share on other sites More sharing options...
elabx Posted September 12 Author Share Posted September 12 1 hour ago, PatrickAdkins said: Have you tried it? Yep, no success. Link to comment Share on other sites More sharing options...
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