0

I try to set the session.save_path directive in PHP to a NFS mountpoint. This works, the session file gets written, but the call to session_start() now takes exactly 2 full minutes (!).

ini_set('session.save_path', '/mnt/nfs/tmp');
// or
session_save_path('/mnt/nfs/tmp');

This is not a simple I/O or network problem (writing other cache files only takes ms) and when I set the directive to a local dir (/tmp), the page load times are back to normal.

I have to set the directive to another directory because the server (Ubuntu) runs a cronjob to do garbage collection, which can not be influenced with session.gc_maxlifetime.

Looks like this bug is already filed but has no followup.

EDIT: So the question is: how can I use NFS mountpoints with session.save_path without abnormal large timeouts?

Joram van den Boezem
  • 1,104
  • 10
  • 24
  • :) How can I use NFS mountpoints with session.save_path without abnormal large timeouts. – Joram van den Boezem Jul 11 '12 at 18:27
  • I'd say you nailed it down to an NFS issue, which isn't really in SO's scope. I'd recommend either migrating the question over to Serverfault or starting to really dig into NFS configuration options. – WWW Jul 11 '12 at 20:28

0 Answers0