[FX.php List] API: PHP not doing Garbage Collection of sess_ files in Windows/Temp

Steve Winter steve at bluecrocodile.co.nz
Tue Mar 26 15:24:18 MDT 2013


Howdy

Chances are that the issue is that the garbage collection is seth such that the probability if it running is so close to zero that it never does…!

What are your values for
	session.gc_probability
	session.gc_divisor
	session.gc_maxLifetime

And what does session.gc_probability / session.gc_divisor equal, since this is the probability that the garbage collection will run on any given session_start() call - if that's zero, or very very low, then that would explain why the files were still there and garbage collection had never run… also if session.gc_maxLifetime is very high (though admittedly it would have to be very high given what you describe) then files will never be seen as garbage, so though collection may have run then all files may have been seen not to be garbage.

Final idea, what is the filesystem type of the drive which the session files are on (though this is unlikely with Win2008) if the filesystem type where the session files are is FAT, then it's possible that the modified timestamp isn't available and so PHP can't determine how old a file is…

Plan B is a perfectly sensible option as well ;-)

Cheers
Steve


> Hi Folks,
> 
> In troubleshooting a Web Publishing problem, I discovered over 2 Millions "sess_" files in the C:\Windows'Temp folder, dating back to when the server was first installed.  In short, the initial problem was solved when I deleted a portion of the files.  It seems that PHP was unable to create a session due to the condition of the folder. Now it can.
> 
> My attention is now turned to why Garbage Collection isn't working on the files in this folder.  The php.ini is stock from FileMaker Web Publishing deployment, including path and GC settings. Session.save_Path is "No Value", which is default. I don't believe that the Windows/Temp folder has been altered.  I don't see any php errors relating to failure to to access the folder.  It can certainly create the records.  They are just not being deleted.
> 
> I have two other Windows systems that are maintaing the proper files level as expected.
> 
> All machines are FMS 12. and Windows Server 2008 R2
> 
> Any suggestions?
> 
> PLAN B is to use a Scheduled Task to manually delete the stale sess files, but I'd rather figure this one out.
> 
> Thanks
> 
> Jonathan
> 
> Jonathan Schwartz
> jschwartz at exit445.com
> 
> 
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

Steve Winter
+44 777 852 4776
steve at bluecrocodile.co.nz



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20130326/e6591535/attachment-0001.html


More information about the FX.php_List mailing list