# Very bad performance (apache/php/mysql)



## CoolDemon (Jul 14, 2009)

Hi,

Freebsd is very slow for me... i don't know if i did something wrong, but it 10-times slower than centos :\

it's responding to pages very slow and server load is above 50

i'm using apache2 + php5 + acp


----------



## mfaridi (Jul 14, 2009)

Do you see error in apache log or no ?


----------



## CoolDemon (Jul 14, 2009)

yes

```
[Tue Jul 14 08:12:18 2009] [error] child process 7143 still did not exit, sending a SIGKILL
```

and

```
[Tue Jul 14 08:13:01 2009] [error] [client 92.201.84.171] request failed: error reading the headers
```

but now it's morning here... and at this time my web site need to work without any problems


----------



## adamk (Jul 14, 2009)

Does it take a while for your machine to resolve IP addresses?  Does /etc/resolv.conf contain the correct information? This could be a DNS issues.

Do you have HostNameLookups enabled in your httpd.conf file?  If they are enabled, try disabling them and see if that helps.


----------



## CoolDemon (Jul 14, 2009)

sure...
and everything is fine with /etc/resolv.conf
HostnameLookups Off


----------



## CoolDemon (Jul 14, 2009)

I also got skip-name-resolve in my.cnf


----------



## dennylin93 (Jul 14, 2009)

Do static pages have problems as well (pages without PHP), or is it specific to dynamic pages?

Perhaps this will determine whether the problem is with Apache, PHP, or MySQL.


----------



## CoolDemon (Jul 14, 2009)

i don't have a static pages, only dynamic!

it doesn't responding many times and when it does- images not loading... 

it's a total mess


----------



## CoolDemon (Jul 14, 2009)

thanks for trying to help, but I'm going bad to centos :stud

Best Regards,
CoolDemon


----------



## dennylin93 (Jul 14, 2009)

A small question. If you don't have dynamic pages, why do you use PHP and MySQL?


----------



## phospher (Jul 14, 2009)

perhaps you should have tested this in a readiness environment first.


----------



## CoolDemon (Jul 15, 2009)

dennylin93 said:
			
		

> A small question. If you don't have dynamic pages, why do you use PHP and MySQL?


I said i don't have static pages...


never mind... FreeBSD is a very slow system.


----------



## dennylin93 (Jul 15, 2009)

Sorry, I misread your post.

I've never encountered this problem before. FreeBSD isn't slow at all.


----------



## Voltar (Jul 15, 2009)

Have you tried running `# atacontrol` to see what mode your hard drive is in? Have you attempted to run any benchmarking utilities like `# iozone` for the filesystem or `# ab` to benchmark Apache? 

Can you log into the server via SSH and use a text based browser (www/links or www/elinks) to view sites hosted on that box? Is it slow then?


----------

