CodeIgniter Forums
Session Race Condition - loss of session upon concurrent ajax requests - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Session Race Condition - loss of session upon concurrent ajax requests (/thread-57075.html)



Session Race Condition - loss of session upon concurrent ajax requests - El Forum - 02-12-2013

[eluser]DevTyme[/eluser]
Is there a solution for this yet? This is causing some big problems.

The issue is best as described here:
http://www.hiretheworld.com/blog/tech-blog/codeigniter-session-race-conditions

I have tried the solution as described in the blog above, but it does not seem to work.

The best way to reproduce this problem is to minimize the $config['sess_time_to_update'] to a low value, such as 50. Create a page that utilizes the session before it loads the view, and then have some AJAX requests fire upon the page load, one after another..

Upon the next page visit, your session will have been destroyed..

Is there a stable build out with a solution for this?