Click to See Complete Forum and Search --> : Random session error


Dracos
12-01-2004, 04:05 PM
I'm doing some contract work, and the error log shows this error
PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
seemingly at random. When it does appear, it usually comes up 2-6 times within a minute or so. I can only guess that it has to do with disk i/o, but top never shows any i/o wait. The site runs PHP 4.2.2 on RedHat Enterprise Server, and typically serves 750MB an hour. I have noticed the occasionally the site becomes unresponsive, and deleting the session cookie solves it.

Here is the session section from php.ini:
Directive Local Value Master Value
session.auto_start Off Off
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 15552000 15552000
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_maxlifetime 15552000 15552000
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_trans_sid 1 1
The server admins are convinced that numerous problems on the server are caused by the scripts... the code isn't very complex, but is riddled with bad practices (I'm campaigning for a total rewrite). I believe all the problems stem from inefficient mySQL calls and poor database design (mySQL 4.0.18 runs on another Slackware server), coupled with non-optimal apache/mysql configs.

Any ideas out there?

dalecosp
12-03-2004, 06:43 PM
I wouldn't trust top(1) for disk I/O. . . what about vmstat(8)? What do you know about the physical aspects of the server.... ?

Dracos
12-03-2004, 07:05 PM
The server is a 2GHz single processor Intel with 1.5GB of ram. Rather beefy.

Here's the output from vmstat:
procs memory swap io system cpu
r b w swpd free buff cache si so bi bo in cs us sy id
11 0 0 10416 953228 102756 1167316 0 4 9 91 106 55 53 2 44