Page 1 of 1

Apache steps on the brake. Maximum confusion!

Posted: Thu Dec 05, 2002 10:12 am
by Heavy
I have one Linux machine that operates as a web and mysql server in a LAN connected to the internet client-wise through an ISDN router.
The configuration is:
Apache-AdvancedExtranetServer/1.3.26 (Mandrake Linux/6.1mdk) FrontPage/5.0.2.2623 PHP/4.2.3. And one Bind server to get DNS for my sites.

Its php direcories are mounted on a client machine with NFS.
Now and then, I am also connected to the server through SSH.

The apache server is set up with several virtual servers on one IP, each virtual server has unique DocumentRoot's, i.e.:

site1.domain.com 192.168.0.60
site2.domain.com 192.168.0.60
site3.domain.com 192.168.0.60
site4.domain.com 192.168.0.60

Let's say site4 has one single file: index.php

I browse it, it is fast and reliable...

Then i dublicate that configuration to another site called site5, with exactly the same content.

Here shows a mysterious (definetly not logic, got to be a goblin, ghost or some evil spirit :P ) problem:

The communtication to this new site5 is sooooo slooooow. It is accessed the same way as the other sites but takes 10 to 20 times more time to deliver pages.
The pages* are small, about 10kB ore something.

I have checked different log files to see if there are messages but none of them told me anything. Here they are:
/var/log/syslog
/var/log/httpd/error_log
my php error log file

Are there other files I should consider consulting?

I have tried to access the page with mysql shut off, in case some database connection was slow.

There was no difference except that after 10 seconds, an error message was delivered telling me about problems connecting to mysql... Of course...

So I don't understand what could be wrong :(

I have 8 virtual servers resolved by 8 entries in bind. It can't be a performance issue about having too many servers, right?

Even after rebooting the whole server, though accessing this page before any other**, the crap is slow.


I'm lost in the space of IP packets!


Thank you for any comments!



* I use index.php to generate several different files. (Don't ask me why, I did it for fun...)
** ...in case there was a infinite loop in a PHP script.

Posted: Fri Dec 06, 2002 2:18 am
by Heavy
The Bind server I currently use is a BIND 8 server, version 9.2. I don't yet know what the "8" stands for but as my problem is not solved yet, I continue to search for the origin of my problem, and read, read, read...

By the way, I use Webmin to set up everything but virtual servers in apache, since my knowledge of all these configuration files is poor.

Posted: Fri Dec 06, 2002 2:35 am
by Heavy
OK here is my BIND8 master server configuration file.
I have changed the server definitions for privacy reasons, but the structure is exactly like this
Those numbers between ( and ) are "ED#ERi978hegtu097dj§½!R34r!"#¤%FV%&¤" to me, so I don't understand what they do yet. But as I continue to search docs and read all the time, I hope to learn quickly.

Any comments on this file: ?

Code: Select all

$ttl 38400
domain.topdomain.	IN	SOA	www.domain.topdomain. jw.domain.topdomain. (
			1037371814
			10800
			3600
			604800
			38400 )
domain.topdomain.	IN	NS	192.168.0.55
www.domain.topdomain.	IN	A	192.168.0.55
todo.domain.topdomain.	IN	A	192.168.0.55
devtodo.domain.topdomain.	IN	A	192.168.0.55
blabla.domain.topdomain.	IN	A	192.168.0.55
index.domain.topdomain.	IN	A	192.168.0.55
phpMyAdmin.domain.topdomain.	IN	A	192.168.0.55
ftp.domain.topdomain.	IN	A	192.168.0.55
doc.domain.topdomain.	IN	A	192.168.0.55
The two sites that are identical and one of them is slow are:

todo (fast)
devtodo (snail's pace)

Posted: Fri Dec 06, 2002 3:01 am
by Heavy
OK, it has probably got nothing to do with BIND.

I changed the IP of the malfunctioning server to 192.168.0.56 and accessed it with http://192.168.0.56/ and it was still slow. Thus, we can't blame BIND for this.

...
...Blame...
I guess it turns out to be me that is to blame. It usually does when it comes to computer related problems... 8O

Posted: Fri Dec 06, 2002 3:41 am
by Heavy
Hmm
It seems to be PHP that is under heavy load, but only when accessed on that file. Remember, like I said before, this index.php is identical to the index.php that is running at full speed.

I will now test the server for the most loaded process and see if it is the PHP process that occupies the CPU.
then, maybe I will cut part after part out of that PHP file to see where the strange slowmotion occurs.

I already have these settings:

Code: Select all

display_errors = On
display_startup_errors = On
log_errors = On
...and no errors related to this shows up anywhere.

Posted: Fri Dec 06, 2002 4:51 am
by Heavy
I gave up for now.

If anyone gets an idea, pleeeease let me know.

I put the dev-site in a directory of the working real site. That made it fast again. :?: :!: :?:

Strange :?

This means I'll manage, but I don't like the situation.

The server is an old thing:
Pentium 166MHz with 64 MB EDO RAM.
Maybe that's the problem, but why does it work then if I put it in another directory with another server name? All access permissions for MySQL were set correctly. 99% sure about that.

... ... ... straaaange...

period.

Posted: Fri Dec 06, 2002 3:57 pm
by Johnm
Lets see your httpd.conf file.
It sounds as if it is defaulting to the default server. If there is no default server defined in the httpd.conf file and Apache cannot resolve the virtual server name it will eventualy go to the default server. Although it should do this rather quickly.

John