PHP 7.1.19 (cli) (built: Jun 21 2018 07:18:00) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.19, Copyright (c) 1999-2018, by Zend Technologies
CI: latest 3.1-stable
Session settings:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'cisession'
$config['sess_expiration'] = 28800;
$config['sess_save_path'] = '/home/test/tmp/session';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 1800;
$config['sess_regenerate_destroy'] = FALSE;
In my log files I suddenly encounter these errors:
[22-Jun-2018 09:46:10] WARNING: [pool test] child 28218 said into stderr: "NOTICE: PHP message: PHP Fatal error: Maximum execution time of 180 seconds exceeded in /home/test/public_html/vendor/codeigniter/framework/system/libraries/Session/drivers/Session_files_driver.php on line 212"
[22-Jun-2018 09:46:10] WARNING: [pool test] child 28218 said into stderr: "NOTICE: PHP message: PHP Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0"
[22-Jun-2018 09:46:10] WARNING: [pool test] child 28218 said into stderr: "NOTICE: PHP message: PHP Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /home/test/tmp/session) in Unknown on line 0"
[22-Jun-2018 09:46:10] WARNING: [pool test] child 9527 said into stderr: "NOTICE: PHP message: PHP Warning: Error while sending QUERY packet. PID=9527 in /home/test/public_html/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php on line 305"
[22-Jun-2018 09:46:10] WARNING: [pool test] child 12832 said into stderr: "NOTICE: PHP message: PHP Warning: Error while sending QUERY packet. PID=12832 in /home/test/public_html/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php on line 305"
[22-Jun-2018 09:46:11] WARNING: [pool test] child 28219 said into stderr: "NOTICE: PHP message: PHP Warning: Error while sending QUERY packet. PID=28219 in /home/test/public_html/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php on line 305"
[22-Jun-2018 09:46:11] WARNING: [pool test] child 12850 said into stderr: "NOTICE: PHP message: PHP Warning: Error while sending QUERY packet. PID=12850 in /home/test/public_html/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php on line 305"
This started happening when updating to PHP 7.1.19 (before never seen these errors...). I suspect that a ajax request is messing up the session, but I cannot say this for sure... Can you help?
Okay, this happend.
This was causing the session issue. I removed the session flashdata stuff and now it works correctly. Is there a way to fix this?
The first error message looks like a "deadlock" (though not really lock-related, just a recurring error within a loop). But I don't see how this as being caused by CI - if a file read fails, it just fails and there's nothing to do about it.
I've never seen the second one, but it means the handler is calling itself, which I suppose is an attempt by PHP to recover from the first one ...
The third is an obvious byproduct of the entire session handler failing, and the other four are not even session related.
No idea how you could fix it, but this being a bug tracker I have to ask you (not for the first time) to direct you help requests to our forums instead.
Its not a deadlock or whatever it is failing session stuff when using ajax calls at almost the same moment.
I had a very similar problem that gave me nuts.
Downgrading to Codeigniter 3.1.8 solves my problem.
@luizzz A "very similar" or the same problem? If it's not the same, how's it similar but different? This is a bug tracker ... we need clues in order to fix bugs.
Please reply to #5545 and provide your PHP version and the session driver you use.
Most helpful comment
I had a very similar problem that gave me nuts.
Downgrading to Codeigniter 3.1.8 solves my problem.