Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

Temp folder on my KMP webserver continually fills up with "sess" files from KMP

Author: Edward Hardin Reference Number: AA-00741 Views: 5340 Last Updated: 10/29/2012 01:38 PM 25 Rating/ 1 Voters

Those "sess" files are PHP session files. Session are created by PHP each time someone visits your website. They have certain lifespan and must be cleaned up automatically by PHP garbage collector (GC).

If that doesn't happen, then possibly PHP is not configured properly or PHP doesn't have sufficient permissions to delete outdated session files.

Here are the recommended settings for php.ini that allow GC to recycle old session files:

session.gc_divisor 100
session.gc_maxlifetime 1440
session.gc_probability 1

Also we recommend to change upload_tmp_dir and session.save_path parameters in php.ini as well:

upload_tmp_dir = "C:\PHP\upload"
session.save_path = "C:\PHP\session"

Please note, that in these examples we assume that PHP is located in the C:\PHP\ folder. If it is located in a different directory, you should specify the path to it instead of "C:\PHP\". Make sure that you specify real paths (create the "upload" and "session" folders if they do not exist yet) and make sure that the "Users" group has full permissions to it (including "Delete" and "Delete Files and Subfolders" permissions). To see that: Right-click on the folder -> Properties > Permissions > Advanced > Effective Permissions. There you need to click "Select" and then select "Users" group from the server. It will show the effective permissions for that group.


Restart IIS after changing php.ini.

You can delete all current session files. It won't do any harm - all users will just need to re-login to the system.

Then after completing the steps above you can watch how those "sess" files are created. The number of files might grow to maybe a hundred or several hundreds - it depend on how many people uses your KB - but at some point it will stop growing and all old session files will be recycled shortly after expiration.

Custom Fields
Applicable to these operation systems:Windows