CodeIgniter Forums
Session files with 0 bytes - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Session files with 0 bytes (/showthread.php?tid=71607)



Session files with 0 bytes - meobeauty - 09-04-2018

Hello everyone! I'm experiencing some problems with session files. Recently, CodeIgniter started creating session files with 0 bytes, two or three every second. Sometimes 5 or 6, even more.

The app is working perfectly; the only problem is that the large amount of files causes the whole system to break when the session folder reaches 15.000 files... only a few of them containing actual session data.

Could you give some insight regarding why this is happening, and any clue to solve it?

Thank you in advance.


RE: Session files with 0 bytes - Pertti - 09-04-2018

My first suggestions was to check sess_time_to_update and sess_regenerate_destroy values, it seems possible to set it up so you recreate sessions often but never clear out old ones.

If however session file size is 0, seems more like it's about new sessions, rather than keeping old one's.

Have you checked your site usage? I know we get constantly hit by people scanning for obvious vulnerable files like WordPress related stuff or if known configuration files are exposed - could be possible these get picked up by CI, but as deemed 404, it tries to handle it as new session?


RE: Session files with 0 bytes - php_rocs - 09-04-2018

@meobeauty,

Also, hopefully you have upgraded to a current version of CI as well.