Link to home
Start Free TrialLog in
Avatar of Lightwalker
Lightwalker

asked on

PHP pages take 5 minutes to load sometimes that use sessions

Dear Experts,

I am really hoping someone will have some insight into this.

What I am experiencing seems only to occur in firefox and safari. I have not tested Opera but have tested IE and Chrome which I have never been able to replicate the issue.

What is happening is on a page that uses sessions (PHPSESSID) to identify a user either someone who is logged in or just someone adding an item to a shopping cart, when they click on a page using Session information the page is so slow to load that it can take 5 minutes to load. The page does eventually load correctly and the session data is still in tack (not removed or deleted). Now the strange thing is while this slow loading page is occurring if I then click on another page that does not use SESSION information the page loads quickly and correctly but if I then click on a different page that does use SESSION information the same slow loading/hanging occurs and will continue to occur on all pages I try to load that use session information until the 5 minute hanging is over.

Now to make things stranger this does not happen all the time, only occasional and not on the same pages, but it only occurs on pages that use SESSION information and only occurs in firefox and safari which seems strange to me as Sessions are server side with the exception of the PHPSESSID cookie which does remains in tack during this slow loading/hanging pages.

I have been in contact with my host and asked them to test it. They have not been able to replicate it and there are no warning or alerts in the logs. I have also had other people test it, it happens very rarely but seems to be increasing in frequency.

I have two main questions. 1) does anyone have any ideas as to why this would occur and why it seems to be browser specific. Could html validation make any difference? My pages are running under DTD XHTML 1.0 Strict which I will need to change to Transitional to validate. I did test this thinking it could be the answer and was hopeful. When I validated a page this problem was occurring on I though I had solved it  but eventually the hanging did occur. But I have not given up hope that validating would help. What else could cause this strange thing?

Question 2) is the any tool that could test what is happening when this occurs. Could firebug give me some clue and if so what part. Is there any other browser tool or software that can help me analyse this when it occurs? I use a Mac.

Many thanks as always for your help


ASKER CERTIFIED SOLUTION
Avatar of stergium
stergium
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lightwalker
Lightwalker

ASKER

Dear stergium,

Thank you for your answer. I will check firebug in the network tab as you suggest.

To answer your question about does it occur on different computers and different version of browser. The answer is yes to different computer, I have tested it on six mac on the same network and two mac on a different network. I have tested it in both firefox 5 and 7. as well as safari 5 and 5.1. I do not have access to a windows machine but do have vmware fussion running windows 7 and IE 8 which I have not been able to replicate the issue, same goes for chrome which I use most often and the issue has not occurred.

I am so sorry I do not know what you mean by testing these pages on the server? I have asked my host support to test it to see if they can replicate it and they where not able to but I have only tested it on my computer that is connected to the server. Is there a way to test on the server that I am not aware of?

Thank you again for you help and suggestions. I really appreciate it
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Dear xterm,

Thanks, I have checked the session.save_path in the php.ini and it is saved to /tmp on a dedicated server.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Who is your hosting company?

If you do not have it yet, grab a copy of YSlow and use it with Firebug.  Sometimes it is very helpful to see what is taking so long.
Hi Ray,

My hosting company is Liquid Web.
I will try YSlow and see what comes up. Thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial