...

View Full Version : session_save_path changed and now...



boeing747fp
06-25-2010, 02:28 AM
session_save_path('/sandrive/sessions');
session_start();

i just changed the session save path to our new SAN drive... but now PHP files take almost 40 seconds to load.... the SAN drive is working fine for video files and picture files with no slowness at all.....what is going on??

shanu.chaudhary
06-25-2010, 07:22 AM
If your site sets a custom location with session_save_path() you also need to set a value for session.gc_probability, e.g.:


<?php
session_save_path('/home/example.com/sessions');
ini_set('session.gc_probability', 1);
?>

Otherwise, old files in '/home/example.com/sessions' will never get removed!

Hope this helps.

boeing747fp
06-25-2010, 07:24 AM
well it works fine on 2 of my 6 servers that i am about to load balance... but 4 of the 6 keep taking 20-40 seconds for php files to load when the new session save path is set. i even tried it in php.ini same issue



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum