Question

Site goes down often until we restart apache, this happens mostly with traffic but without traffic as well.

Posted February 22, 2020 242 views
ApachePHP

A website hosted on a dedicated server goes down itself with traffic or no traffic and goes up when i restart apache. I have contacted host team of godaddy and they say no issue on their side. Project is built on PHP oscommerce and less customized.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @habibjutt

If you have access to check the Apache error log you can see if there any logged errors. Usually this happens when you exceed the Apache workers and what will happen is when you try to load any of the sites hosted on the server, the browser will keep spinning/loading until there is a free worker to handle the process.

You can check if the Apache workers have been exceeded by using the following command:

For CentOS servers:

grep -i workers /usr/local/apache/logs/error_log

For Ubuntu:

grep -i workers /var/log/apache2/error.log

If you can’t find any references when searching for this, you can still check the Apache error log for any logged errors. You can tail the error_log for the last 100 or 200 rows:

tail -n 200 /usr/local/apache/logs/error_log
or
tail -n 200 /var/log/apache2/error.log
depending from the server’s distro.

Hope this helps! Let us know how it goes.

Regards,
Alex

Submit an Answer