(Solved) Many session files (112k in 3 days)(admin accessed only by me) |
![]() (This post was last modified: 03-12-2018, 04:11 PM by lwmirkk. Edit Reason: Solved )
Hi!
I use CI 3.1.2 The system is a private admin that is only accessed by me. I think the config it is ok.... The system is creating many many session files, look my config: Code: $config['sess_driver'] = 'files'; Thanks a lot.
@lwmirkk,
1st recommendation (assuming it's possible) upgrade CI version to current version. 2nd, config 'sess_expiration' is set wrong. read the documentation (assuming you don't want it to expire). 3rd, I recommend that you read the CI documentation regarding sessions ( https://www.codeigniter.com/user_guide/l...sions.html ) (03-05-2018, 07:41 PM)php_rocs Wrote: @lwmirkk, Hi! Thanks a lot. 1 - Upgraded to the last version to test. 2 - True, the value is not correct, changed to 0. 3 - I changed the default path to a custom path because when in the default path (tmp?), the session expires some hours later, in a custom path, this problem does not occur. I changed to the default path again after the upgrade to test if everithing works fine. Thanks again. ![]()
Changed to database driver to see if the problem occurs.
A new row is inserted every second with a new session_id each page is accessed (same IP)... It is normal? my config is: Code: $config['sess_driver'] = 'database';
UPDATE:
It is my fault... With session lib in autoload the session id is generated each request, but some request is from an App, so the CI recognize each request as a new client and not the same. Changed the session lib to not autoload and load only when necessary (most part of the time)...
Hi this issue i have solved by cronjob
Please check this url step by step how to solved this : https://myphpinformation.blogspot.com/se...results=10 |
Welcome Guest, Not a member yet? Register Sign In |