0

My site is working fine with CodeIgniter version 3.1.6 but sometimes I'm getting the CI_SESSION error. This is frustrating for me because a site is working fine and suddenly its show this error. After a few seconds when I remove my cache and try again it starts working.

ERROR:

Database Error: A Database Error Occurred
Error Number: 2013
Lost Connection to MySQL Server during query
SELECT GET_LOCK('e73457895454a9154824924849bf47', 300) AS ci_session_lock
FileName:Libraries/Session/drivers/Session_database_dirver.php
Line Number:358

I tried different option in config.php file but no luck.

Here are my current config.php settings.

$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_expire_on_close'] = TRUE;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;
$config['sess_driver'] = 'database';

I don't know whether its due to server capacity to handle too many requests or its due to some CI_SESSION settings.

Maher
  • 363
  • 2
  • 5
  • 18

0 Answers0