• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP Fatal error in Session_files_driver.php on line 247

#1
Hi there,

I built a program using CI 3 with a login page that auto-loads the 'session' library in autoload.php.

The problem is that occasionally, now 2nd day in a row, I encounter a 500 Internal Server Error when using the site. After reviewing the error logs in cpanel, this is what I see:


Code:
mod_fcgid: stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /system/libraries/Session/drivers/Session_files_driver.php on line 247


The only thing that helps fix this is removing the session library from the auto-load file, waiting some time and then re-adding the session library. This happens very sporadically and I am not sure whether this is a bug or something to do with the server config. Once the session library is re-added to the autoload file after some time, the website is working as normal.

All the default session settings are used:


PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE


Does anyone have any suggestions as to why this is happening and how to troubleshoot this further? Any help is much appreciated. Thank you!
Reply

#2
Exceed execution time. Maybe you should check your codes for infinite loop.
Keep calm.
Reply

#3
You can try to change the execution time by placing the below at the top of your index.php file:

ini_set('max_execution_time', 60); //60 seconds = 1 minute
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#4
(01-18-2016, 11:22 AM)vm90 Wrote: Hi there,

I built a program using CI 3 with a login page that auto-loads the 'session' library in autoload.php.

The problem is that occasionally, now 2nd day in a row, I encounter a 500 Internal Server Error when using the site. After reviewing the error logs in cpanel, this is what I see:


Code:
mod_fcgid: stderr: PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /system/libraries/Session/drivers/Session_files_driver.php on line 247


The only thing that helps fix this is removing the session library from the auto-load file, waiting some time and then re-adding the session library. This happens very sporadically and I am not sure whether this is a bug or something to do with the server config. Once the session library is re-added to the autoload file after some time, the website is working as normal.

All the default session settings are used:


PHP Code:
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE


Does anyone have any suggestions as to why this is happening and how to troubleshoot this further? Any help is much appreciated. Thank you!



Hello VM, Well thanks for this post I have done the same thing you have explained and it fixes the issue but I think it must be a bug because I have same application made in CI 2 and it is working perfect without any issue. I will still monitoring for this issue and if I face this again I will downgrade my CI version from 3 to 2.
Reply

#5
You have some bad code somewhere that's hanging.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.