php sites hang

9 posts / 0 new
Last post
#1 Mon, 09/21/2009 - 16:08
todhend

php sites hang

I just installed the latest centos 5.3 I386 with the gpl virtualmin and all works well but the php sites hang, each page refresh can hang as much as 30 seconds, these same sites worked well with the same settings on other virtualmin releases also with debian, so its not the code, is there anything I need to be aware of with this latest centos or virtualmin ?, html seems to be fine

Mon, 09/21/2009 - 18:25
andreychek

Well, it could be any number of things, from a missing dependency, to an incomparability in the different PHP versions, to a DNS issue.

Do all PHP sites hang? Are they custom code, or do they run something like WordPress, Joomla, Drupal or the like?

What if you use just a really simple PHP script, with only a single "phpinfo()" line in it -- does that work?

And when you say they hang -- do they eventually work, or do they time out?

-Eric

Mon, 09/21/2009 - 18:37 (Reply to #2)
todhend

yes php info works, yes they eventually come up and yes one is custom code that is running fine on other servers

a regular php script does the same and as a matter of fact I changed to the routers dns and it got worse even on html sites. pictures images show up last, I used the install.sh, it is possible there are missing dependencies but I did upgrade update, turn off several unnecessary services but I always do that, seems to be script related hangs worse than strait html, a non mysql using php script is no difference

Mon, 09/21/2009 - 18:42 (Reply to #3)
andreychek

Yeah, sometimes unfortunate things like this can happen when switching from one server to another; the only thing we can do is just try and track it down :-)

Are you seeing any errors in the Apache logs for the Virtual Servers having problems?

And are you certain that DNS on the server itself is working correctly?

That is, whatever is listed in /etc/resolv.conf, is that correct?

-Eric

Mon, 09/21/2009 - 18:57 (Reply to #4)
todhend

I've changed those dns servers several times in different order and its a mirrored setup to another, the only difference is the virtualmin is newer and using php_fcgi

Mon, 09/21/2009 - 19:07 (Reply to #5)
andreychek

If it's an FCGID issue, you wouldn't be seeing HTML sites slow down as well -- as FCGID is only for executed code

However, you can certainly try having it use something like straight CGI rather than FCGID.

Another thing to check -- do you have plenty of CPU and RAM available on your site? If some process is taking up a lot of resources, that could be slowing everything down.

You can run "uptime" to see the current load average on your system. You can also run "top" to see what's using up resources.

-Eric

Mon, 09/21/2009 - 19:19 (Reply to #6)
todhend

not the pc its not in production yet, no resources at all being used,

19:17:17 up 7:53, 1 user, load average: 0.10, 0.08, 0.02

I guess I could reload the whole thing, seems to be faster than trouble shooting lol

top - 19:19:50 up 7:56, 1 user, load average: 0.08, 0.10, 0.03 Tasks: 96 total, 2 running, 94 sleeping, 0 stopped, 0 zombie Cpu(s): 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2009516k total, 522388k used, 1487128k free, 45556k buffers Swap: 4030456k total, 0k used, 4030456k free, 254312k cached

Tue, 09/22/2009 - 17:52 (Reply to #7)
todhend

I reinstalled from a new Centos install and the same issue occurred, thought Id let you know

Wed, 09/23/2009 - 17:28 (Reply to #8)
todhend

turns out I had some bad sectors on that hard drive, could have been that, thanks for the info anyway!

Topic locked