Re: [PHP4BETA] session load bugs?

From: Date: Mon, 03 Apr 2000 06:59:56 +0000
Subject: Re: [PHP4BETA] session load bugs?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13028@lists.php.net to get a copy of this message
> : prevent me from using it, since I can't reply on the stability of session > : variables. > > I wonder if http_load caches the cookies and puts them in the next > request, does it? If not, then are you passing the session ID as > part of the URL? If no, then php would think of the request as a new > request each time and the session variable would always be the same. > How do you check to see if session variable has increased; through > browser? Well, you should know that browser will have a new session. ---The test tool I wrote stored the session cookie from the http header and sent it back in each successive request. I also ran another test with using the PHPSESSID in the url as the query string. I used http_load with the session id in the url. The reason I started testing multiple requests to the same page with the same session id, is that I found with multiple requests from multiple clients with each having their own idividual session they failed in the same manner. So, I thought by process of elimination, I could limit the number of variables in my test so I can see what was failing. So when I have multiple clients requesting the same simple page with different session ids, the session variables do not have stable values through out the tests. For example, one of the failures was for a particular session in a test, that a particular session variable would all of a suddon get assigned a random value. So for request #58 to the script I would get count $count=58, then the 59th request to the same session would give me $count=2. In my test tool, I dump out the entire http request and http response for each thread so I can see what I'm sending and what I'm getting back. So I'm not really sure what to do at this point. Sessions seem to work most of the time, but I think they have problems under a load. The good thing, is that I even stress tested connecting to oracle in the same manner as I tested sessions, and it worked great :). I have the source of my test app, which I can give out, and http_load is freely available. I just hope we can resolve this so that I can use sessions, since they are a very nice feature to have. You can set up a simple page like I did and see that it fails. My example script was as follows <? session_start(); ?> <html> <? if (!isset($count)) { session_register("count"); $count=1; } else $count++; ?> </html> So if you hit this 50,000 times the sess_* files should all have values of count being 50,000 in them using your favorite test tool (in this case both my multithreaded tool, and http_load being ran from multiple machines hitting the same server). I wouldn't expect to have many different values for count in each of the sess_*. Most of the sessions had values close to 50,000 but 75% of them were off by anywhere from 2 to 3000. Sascha and I had gone back and forth several times in email as to try to narrow down the test cases to see if we can get the sessions to be stable. I guess without putting a bunch of debugging code in it myself, I don't know what to do. I know that we want to get php4 out the door, but I think this one should prolly get looked at. Should I write a bug in the bug reporting on this one? Walt

« previous php.version4 (#13028) next »