CodeIgniter Forums
CI 3.0.1 random logouts - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forum-6.html)
+--- Forum: Issues (https://forum.codeigniter.com/forum-19.html)
+--- Thread: CI 3.0.1 random logouts (/thread-62850.html)



CI 3.0.1 random logouts - blasto333 - 09-02-2015

I use to have this issue in 2.x but I thought the issue was addressed in CI 3.x. This has happened twice and I cannot figure out why. The 1st time it happened I was debugging and using die and var_dump a lot so I am not sure if that caused it? I might have deleted/recreated database which I know what would cause the issue; but I am pretty sure I didn't.

I am not sure what caused it the 2nd time?

Here are my settings:
$config['sess_driver'] = 'database';
$config['sess_cookie_name'] = 'phppos';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = 'sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

Do you know what can cause the session to be destroyed? I didn't check if the cookie was missing but next time it happens I will. I am using Safari 9 on mac os x


RE: CI 3.0.1 random logouts - PaulD - 09-16-2015

Have you tried setting the $config['sess_time_to_update'] to 0 so that session is not regenerated automatically.
http://www.codeigniter.com/user_guide/libraries/sessions.html#session-preferences

That might help.

Best wishes,

Paul.


RE: CI 3.0.1 random logouts - blasto333 - 09-16-2015

(09-16-2015, 07:02 AM)PaulD Wrote: Have you tried setting the $config['sess_time_to_update'] to 0 so that session is not regenerated automatically.
http://www.codeigniter.com/user_guide/libraries/sessions.html#session-preferences

That might help.

Best wishes,

Paul.

I actually changed that to 1 just to mess with it to see if that was the issue. I looked at the code and it looks like there is locking to prevent this issue. I haven't had it happen since I posted this so I am guessing I might have been deleting the database (which is do often during development)


RE: CI 3.0.1 random logouts - blasto333 - 10-27-2015

This happened again; but I didn't have MySQL general log on. This time it happened in Chrome. Next time I will have more info.