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

"Cannot call session save handler in a recursive manner" #2056

Closed
Martin-4Spaces opened this issue Jun 14, 2019 · 6 comments · Fixed by #2307
Closed

"Cannot call session save handler in a recursive manner" #2056

Martin-4Spaces opened this issue Jun 14, 2019 · 6 comments · Fixed by #2307

Comments

@Martin-4Spaces
Copy link

Screenshot_2019-06-14_at_09_23_07_png

Happens sometimes. Cannot give you a step-by-step guide to reproduce.
This was also a problem in CodeIgniter 3. Check bcit-ci/CodeIgniter#5545

I think the issue os that filesize($this->filePath . $sessionID) in FileHandler::read is returning a cached size. Check https://stackoverflow.com/questions/3747982/php-filesize-reporting-old-size

Adding clearstatcache() before filesize should fix the issue.

@Winchester37
Copy link

Why use alpha 5 ? CodeIgniter 4.0.0-beta.3 you need to use it.

@MGatner
Copy link
Member

MGatner commented Jun 14, 2019

Agree with @Winchester37 that you should upgrade to the latest version and try again. Also make sure you've read this: https://codeigniter4.github.io/CodeIgniter4/libraries/sessions.html#a-note-about-concurrency (which I assume you know, given your final comment, but for anyone else who finds this thread as well).

@Martin-4Spaces
Copy link
Author

Martin-4Spaces commented Jun 14, 2019 via email

@faizananwerali
Copy link

Is it an error of maximum execution time? If yes then you should change it apache

@Martin-4Spaces
Copy link
Author

@faizananwerali I think it is an error of infinite loop caused by cached filesize response. The maximum execution time is an effect of that error.

@diegoldev
Copy link
Contributor

I faced a similar issue with sucessives ajax calls. I've worked around using session_write_close() function at the beginning of the method. But, I'm think that something is not working well.
I read the note about concurrency but have no sense destroy session as susggested because it logout me from the app.

@jim-parry jim-parry added this to the 4.0.0-rc.2 milestone Sep 8, 2019
@jim-parry jim-parry modified the milestones: 4.0.0-rc.2, 4.0.0-rc.3 Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants