#25070 [NoF->Opn]: Windows is stopped on intesive session work

From: Date: Wed, 20 Aug 2003 08:30:03 +0000
Subject: #25070 [NoF->Opn]: Windows is stopped on intesive session work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-46291@lists.php.net to get a copy of this message
ID: 25070 User updated by: akss at plesk dot ru Reported By: akss at plesk dot ru -Status: No Feedback +Status: Open Bug Type: Session related Operating System: Windows PHP Version: 4.3.2 New Comment: Patch for fix ext/session/mod_files.c on windows: --- mod_files.c.orig Tue May 20 20:01:54 2003 +++ mod_files.c Fri Aug 15 05:12:40 2003 @@ -124,6 +124,7 @@ static void ps_files_close(ps_files *data) { if (data->fd != -1) { + flock(data->fd, LOCK_UN); close(data->fd); data->fd = -1; } @@ -275,8 +276,10 @@ if (data->fd < 0) return FAILURE; - if (fstat(data->fd, &sbuf)) + if (fstat(data->fd, &sbuf)) { + flock(data->fd, LOCK_UN); return FAILURE; + } data->st_size = *vallen = sbuf.st_size; *val = emalloc(sbuf.st_size); @@ -287,6 +290,7 @@ lseek(data->fd, 0, SEEK_SET); n = read(data->fd, *val, sbuf.st_size); #endif + flock(data->fd, LOCK_UN); if (n != sbuf.st_size) { if (n == -1) @@ -325,6 +329,7 @@ lseek(data->fd, 0, SEEK_SET); n = write(data->fd, val, vallen); #endif + flock(data->fd, LOCK_UN); if (n != vallen) { if (n == -1) Other case apache hangs up. Previous Comments: ------------------------------------------------------------------------ [2003-08-18 19:46:01] sniper@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-08-13 04:30:56] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-08-13 04:16:44] akss at plesk dot ru Description: ------------ php-4.3.2 Windows hangs at frequent references to the pages using the sessions mechanism. This is because too many locks are created for a session file "sess_xxx". ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25070&edit=1

« previous php.bugs (#46291) next »