0

I've inherited a website which was previously working (albeit a little slowly) but suddenly the PHP pages are loading incredibly slowly. Even a very simple "contact us" page takes about 10 seconds to display. The majority of the pages are HTML which are fine.

I don't know much about PHP or IIS! PHP version is 5.6.0.

Any ideas or suggestions much appreciated.

EDIT:

The problem was due to PHP session files not being deleted out of c:/windows/temp by the garbage collector. I'm not quite sure why because as far as I can tell the GC settings were ok...

session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.gc_probability = 1

...and the permissions to the directory look good. The directory was getting bigger and bigger (hence why it was running slowly previously - they must have been stacking up for a while). Anyway I pointed php to a new directory and everything is working, with old sessions being deleted as they should have been.

[I'd actually tried to look in this directory but got a dialog box saying something like "you don't have access, click to enable" so I clicked, but then windows explorer stopped responding. I assumed I didn't have access to the directory (this has happened before), and moved on to something else. Silly me.]

David
  • 1
  • 2
  • This seems like more of a server-fault question, if the PHP itself hasn't been changed. The first thing I'd ask you there though is whether rebooting improves things, and whether it's own a shared server (maybe someone else is slowing everything up). – Jon Hanna May 12 '15 at 11:38

1 Answers1

0

It can be anything: Database issues, hardware or software problems or even problems from network...

I suggest you to measure time needed to serve that "contact us" page and try to detect what is happening.

Community
  • 1
  • 1
Daniel Argüelles
  • 2,229
  • 1
  • 33
  • 56