CodeIgniter Forums
Codeigniter session bugging out with ajax calls - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Codeigniter session bugging out with ajax calls (/showthread.php?tid=83053)



Codeigniter session bugging out with ajax calls - JernalinSadhoo - 09-15-2022

My CodeIgniter app uses the session library and saves data to the DB.

I've been having some problems where blank sessions are created after a certain ajax call.

Upon investigating, it seems that there were 2 simultaneous functions calls that fired off that require a session validation. One would fail and the other would be fine.

I was able to fix this by not having them fire off simultaneously. But I still don't understand the REASON why it fails. Does it have to do with one call updating omegle.2yu.co the user cookie and the 2nd call invalidating? Or maybe when reading the DB it dies somehow?

I looked over the Session core class a bit and have not found any clues to the cause.

If any one had the same omeglz echat problem before I would appreciate any advice on how to debug or what the cause is.

Thanks!


RE: Codeigniter session bugging out with ajax calls - InsiteFX - 09-16-2022

Please Read:

CodeIgniter 4 User Guide - A note about concurrency