The problem is that I'm making multiple ajax calls to a specific action on my system, these calls are making outer calls to a distant system and are waiting significant amount of time to complete and return results. On my system I am using ZF2 AuthenticationService for user authentication (saving the identity to the session). I browse trough the code and found out the different approach that ZF2 use to work with the session data, I so how the SessionManager each time write into the $_SESSION without caring does this session data is changed or not. This writing into the session global makes the session locks. In my ajax requests I need to read the data from the session but when I try to getIdentity (access the session data) the Session locks and other ajax request that needs to run asynchronously stops to wait until the Seesion unlocks. Does ZF2 has a capability to workarround this issue? How? Thank's a lot
I had this problem a while ago and fixed it manually with something similar to here: http://konrness.com/php5/how-to-prevent-blocking-php-requests/ ... I'm not sure if there is a zf2 way but at least there's a manual way, just in case you were not aware of it.
Thanks for this post it was useful, but I need ZF2 developpers include some kind of feature to the Library that stop the session writhing when is not needed. Till that moment I will write a method that would fits to me. Thanks again.
@gecata83 your problem is maybe this part: https://github.com/zendframework/zf2/blob/master/library/Zend/Session/SessionManager.php#L150
Is this still an issue?