I am working on a web app at the moment, the users logs in a session is created and logged to the database.
What is occurring is that a user will get randomly get logged out, through no option of their own. The backstory is that this is generally happening to users who are sharing an account (not the best thing but the nature of the app, means it needs to be allowable).
Could this be the reason for the random logouts? Or is something deeper in CI and storing sessions in the database? I also read that doing a lot of AJAX requests close together can cause the SESSION ID to change, and the could then overwrite the database record and log the user out. Again is this a possibility? I think this one is less so as I have written a patch to stop this happening.
SESSION CONFIG:
$config['sess_cookie_name'] = 'app';
$config['sess_expiration'] = 0;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie'] = TRUE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_use_multisessions'] = TRUE;
$config['sess_multisession_expiration'] = 10;
session_expirationin config file..make sure its value is0. Do share the session config variables from config file