#19022 [Com]: PHP Warning: Failed to write session data (files)

From: Date: Wed, 04 Sep 2002 11:35:49 +0000
Subject: #19022 [Com]: PHP Warning: Failed to write session data (files)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-18404@lists.php.net to get a copy of this message
ID: 19022 Comment by: phpbugs@mx4k.com Reported By: phpbugs@mx4k.com Status: Feedback Bug Type: Session related Operating System: linux (rh7.3), apache 1.3.26 PHP Version: 4.2.2 New Comment: hi there, as far as i can tell the problem only appears if the server runs on middle to high load. (eg. >100httpd) the problem machine is a p4-1,8ghz with 1gig ram (no smp) and we couldnt yet reproduce the problem on any other server. the machine only runs the httpd, postgres is running on a different machine. its using a IDE hd (some special scsi or something) i'm willing to apply some patches to get rid of the problem. i looked into the problem myself but couldn't find any problem in PS(mod)->write or the resulting write to the hd (which i guess is PS_WRITE_FUNC(files)). I never coded on linux neither much of c (only c++, c#, java) but maybe p/write does have a problem. #ifdef HAVE_PWRITE n = pwrite(data->fd, val, vallen, 0); #else lseek(data->fd, 0, SEEK_SET); n = write(data->fd, val, vallen); #endif anyways, send me some patches via email and i'll try my best to find a workarround. greets, thomas Previous Comments: ------------------------------------------------------------------------ [2002-09-04 00:47:38] rasmus@php.net Yup, the SMP means it likely has multiple processors. "cat /proc/cpuinfo" would tell you for sure. A nasty bug was fixed recently which only affected SMP machines and would cause exactly these symptoms. 4.2.3 will have the fix. ------------------------------------------------------------------------ [2002-09-04 00:43:56] rossr@reactive.com I'm not sure since we don't host the production site we are just the developers. When I do a uname I get this: Linux lsh129.siteprotect.com 2.4.18-pre7 #5 SMP Mon Feb 4 17:42:59 CST 2002 i686 unknown I'm guessing that the SMP bit means that the server is using multiple processors, but I'm not sure. ------------------------------------------------------------------------ [2002-09-04 00:29:58] rasmus@php.net Your production server wouldn't happen to have multiple cpus? ------------------------------------------------------------------------ [2002-09-04 00:06:04] rossr@reactive.com Hi there, We didn't run into this problem until the site that we were working on went live and we have been unable to replicate the problem on our dev server in our office. So I'm guessing that the bug only appears on a loaded system. Cheers, Ross ------------------------------------------------------------------------ [2002-09-03 23:46:17] kalowsky@php.net Unfortunately I cannot reproduce this locally here, and looking the code I don't see anything particularly/glaringly wrong. The piece of code in question (I believe) is the php_session_save_state() function, most specifically the PS(mod)->write pieces of code. Does this happen on a non-loaded system as well? Would any of you be willing to apply some patches to see if things do and do not work? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/19022 -- Edit this bug report at http://bugs.php.net/?id=19022&edit=1

« previous php.bugs (#18404) next »