Page 1 of 1
Boggling issue, experts please help me tackle this!
Posted: Fri Oct 14, 2005 3:50 pm
by chrys
Alright, here's the rundown:
First of all, I appreciate ANY insight and help anyone can offer, I've been struggling with this phantom issue for months.
Where I work, I have developed a very intricate application in PHP/MySQL that people use all day every day in house.
The Problem
Once in a random while, some people more than others, they seem to load forever until it says "max connection time reached". The only way to fix it (they can't load ANY pages within the application) is to clear their cookies and log in again. So I feel it's tied into the session somehow... I really don't know. It doesn't happen in IE, only in Mozilla. For one girl it happens once every 30 minutes and they're getting fed up with it while I'm getting fed up of trying to figure out what's happening. I don't know if it's the database, the sessions, the browser, the code?
Has anyone every heard of a problem like this before?
Posted: Fri Oct 14, 2005 3:56 pm
by feyd
it sounds like you need to add debug output (no shown to users) to your code seeing where the problem lies. I would imagine it happens in a loop or could be a concurrency issue.. the logging should help illustrate where those interactions may occur. I would suggest using a database table for the storage since they handle concurrency far better than file systems. It could have something to do with the sessions if your server is set to wipe the session storage area too frequently or you have limits on the size/quantity of sessions you can have (this only really applies if you are using the file system sessions, obviously)
Posted: Fri Oct 14, 2005 4:02 pm
by Ambush Commander
Ah, it's a
Mandelbug.
Hmm.. ::thinks::
I have no clue. But it seems like you're running in the dark here, so let me give you some tips.
1. I assume most of your users are logged in. Then, you should identify points in the application where you would like some sort of trace on what's going on when the bug happens. Log these points in files, and when a user reports a connection timeout, then investigate.
2. Profile your application. If you use something like
APD, you may be able to identify possible bottlenecks which may be timing your users out. Unfortunantely, you'll need to run the app on PHP5, so be careful about mysterious bugs cropping up when you migrate it (of course, a well written program should be able to versionwalk with no problem.)
3. Ask users for more detailed descriptions of the problem. Ask what they where doing, when they where doing it, and as this goes on, try to reproduce the problem. The "no IE problems" sounds a bit fishy to me, so you might want to look into the parts of the program that handle the HTTP protocol (headers and output)
Edit Feyd's comment about concurrency is a very possible situation, and is very devious because it is not a bug but an underlying architectural flaw. However, the ties to browsers do not jive with this idea...
Posted: Fri Oct 14, 2005 4:33 pm
by chrys
Thanks for the heads up.
I have debugged all of my code, but the problem is that I can't reproduce the error because I don't have the time to use the application, I can't "use" the application, because that means I would have to do real processing of applications which isn't my job.
There are only 4 files they use all day.
view.php
edit.php
sendmail.php
list.php
I bring this up because there is so little going on that if it was a bug, it would be happening constantly, not at random intervals.
The only solid hint I have is that it has to do with sessions. When you clear the cookies, which contains the PHPSESSID, it asks them to log in again and it's fine. It seems like it hangs on something that is in the sessions... I believe we use file system sessions, so maybe the /tmp/ejapotj30qtiu0-3u file is locked up and can no longer be read? Have you ever heard of this?
I will be investigating more tomorrow, so I will post anything I can find, but I'd love to solve this problem and make everyone happy and rebuild their confidence in my skills.
Thanks a bunch guys,
Chrys