Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent requests in 0.0.7-alpha version #19

Open
zhutik opened this issue Apr 2, 2015 · 7 comments
Open

Concurrent requests in 0.0.7-alpha version #19

zhutik opened this issue Apr 2, 2015 · 7 comments
Assignees
Milestone

Comments

@zhutik
Copy link

zhutik commented Apr 2, 2015

Hey, recently I've updated slim-auth to 0.0.7-alpha.
I've checkout documentation and saw that in 0.0.7-alpha \Slim\Middleware\SessionCookie requirement was removed and instead of it, Zend\Session is used.

But I have some issues with new update when trying to run some parallel requests to server.
For example:

  1. First - long request to process some data.
  2. Seconds request to check progress status.

In 0.0.6 second request works fine, but in 0.0.7 it waits until first request is finished.
Seems like this issue is caused by blocking sessions - first request do not close session write until it finished, so second one can't access current session.

Any suggestions how I can fix it without calling session_write_close(); in application code?
When I downgraded to 0.0.6 everything works perfect

Thanks!

@jeremykendall
Copy link
Owner

@izhutaev-sugarcrm Great catch. I'll look into that and let you know what I find.

@jeremykendall jeremykendall self-assigned this Apr 2, 2015
@zhutik
Copy link
Author

zhutik commented Apr 2, 2015

@jeremykendall Thanks! FYI: I'm still using Slim v2.4.2

@jeremykendall
Copy link
Owner

Good to know. Thanks again.

@jeremykendall jeremykendall added this to the 0.0.8-alpha milestone Apr 3, 2015
@harikt
Copy link

harikt commented Apr 8, 2015

As @izhutaev-sugarcrm mentioned it seems the only way is closing the session.

If you don't need the session, may be good not to start the same.

I am looking at http://www.smartdomotik.com/2013/02/14/php-session-locks-how-to-prevent-blocking-requests/

@harikt
Copy link

harikt commented Apr 8, 2015

Hm... that article seems copied from http://konrness.com/php5/how-to-prevent-blocking-php-requests/ :-/

@jeremykendall
Copy link
Owner

@izhutaev-sugarcrm and @harikt: I have a fix. Will try to get it posted this weekend.

@harikt
Copy link

harikt commented Apr 18, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants