Welcome Guest, Not a member yet? Register   Sign In
Session files with 0 bytes

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.

(This post was last modified: 09-04-2018, 07:44 AM by Pertti.)

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?


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

Theme © iAndrew 2016 - Forum software by © MyBB