Re: [PHP4BETA] Re: yet another Session oddness/bug?
| From: | waltb | Date: | Wed, 29 Mar 2000 21:17:07 +0000 |
| Subject: | Re: [PHP4BETA] Re: yet another Session oddness/bug? | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12827@lists.php.net to get a copy of this message | ||
Sascha Schumann wrote:
> On Wed, Mar 29, 2000 at 11:29:59AM -0800, waltb wrote:
> > Hi Peter,
> > I have included my test app. Its pretty straight forward.
> > To compile it just do
> > gcc -o test test.c -lpthread
>
> Are you seeing any messages in Apache's error.log?
>
I've seen a few (3 or 4) segfaults for Apache, but other then
that it seems to be ok.
I'm currently running a test using 4 machines, each with 200 threads
doing 200 calls to the same script, and I'm getting no apache errors.
I've noticed that there seems to be 3 recurring problems with sessions
under
a load. I've tested using the files method as well as mm method of
session handlers
under linux using apache 1.3.12.
1) The very first time the test app calls the script the session is
created,
and apache sends me back the Set-Cookie: PHPSESSID=blah.
The next request to the same page seems to fail. The test for
!isset($count)
falls through and the script re-registers the count variable. It should
already
be set, because session_start() was called.
<?
session_start();
?>
<html>
<?
if (!isset($count))
{
session_register("count");
$count = 1;
echo "\nNEW SESSION\n";
}
else
$count++;
?>
COUNT=<? echo $count; ?>;<br>
</html>
2) During a test, the value of the session variable
seems to get assigned some random value. So
request # 25 returns a response with COUNT=25,
but the ver next request #26, the COUNT=2.
3) This one could be related to other problems, but
I have seen cases where I get multiple lines of
errors in the php error logs.
[30-Mar-2000 03:52:54] PHP Warning: Failed to write session data.
Please check that the current setting of session.save_path is correct
(/tmp) in Unknown on line 0
[30-Mar-2000 03:52:54] PHP Warning: Failed to write session data.
Please check that the current setting of session.save_path is correct
(/tmp) in Unknown on line 0
[30-Mar-2000 03:52:55] PHP Warning: Failed to write session data.
Please check that the current setting of session.save_path is correct
(/tmp) in Unknown on line 0
[30-Mar-2000 03:52:55] PHP Warning: Failed to write session data.
Please check that the current setting of session.save_path is correct
(/tmp) in Unknown on line 0
I would really like to be able to rely on sessions, but the site I'm
working on is most likely going to have a LOT of traffic,
so I need it to be stable. If there is anything I can do to help with
testing/debugging please let me know.
Thanks a million
Walt