Results 1 to 13 of 13
Thread: Apache slow?
-
12-17-2006, 04:50 AM #1Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
Apache slow?
Hi I recently notice a slowness when accessing my sites on my dedicated servers. Here's how it goes. I rebooted the system and everything runs normal. After 5 minutes, the slowness begins. Then I'm not able to access any of the sites on the server at all. During the meantime, FTP-ing is working normal. I stopped Apache and restarted it, problem fixed. Then after few minutes, it slows and stalls again. Any ideas where to begin?
System:
Redhat Linux 9.0
Apache version 2.0.40
-
12-17-2006, 04:54 AM #2Disabled
- Join Date
- Dec 2002
- Location
- chica go go
- Posts
- 11,876
Have you checked your error_log for anything strange?
-
12-17-2006, 05:04 AM #3Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
Sorry for being such a newbie...but what is the command to check the log via SSH?
-
12-17-2006, 05:05 AM #4Disabled
- Join Date
- Dec 2002
- Location
- chica go go
- Posts
- 11,876
try
tail /var/log/httpd/error_log
i'm not sure where apache2 stores error logs.
-
12-17-2006, 05:08 AM #5Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
Code:[root@ns1 root]# tail /var/log/httpd/error_log [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring! [Sun Dec 17 02:33:51 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive --- ignoring!
-
12-17-2006, 05:12 AM #6Disabled
- Join Date
- Dec 2002
- Location
- chica go go
- Posts
- 11,876
Well, that's a hint. Could you try and figure out where you are declaring the full-url as the 401 errordocument. Could be httpd.conf, could be one of your accounts' .htaccess file.
here's a hint
find /home -name .htaccess -exec grep -Hi "ErrorDocument 401" {} \;
That'll show you every .htaccess file that contains "ErrorDocument 401".
-
12-17-2006, 05:31 AM #7Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
Found only 1 result. Looks like it's in one of the domains.
Code:/home/*DOMAIN_NAME*/public_html/.htaccess:ErrorDocument 401 *URL*
Code:[Sun Dec 17 03:00:21 2006] [error] server reached MaxClients setting, consider raising the MaxClients setting
Last edited by sir_han; 12-17-2006 at 05:40 AM.
-
12-17-2006, 05:37 AM #8Disabled
- Join Date
- Dec 2002
- Location
- chica go go
- Posts
- 11,876
Alright, now open that file, and just comment out the 401 line.
-
12-17-2006, 05:48 AM #9Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
I've deleted the .htaccess file instead. There seems to be no more error reporting the "401 document error" anymore...which is good.
About the MaxClient error....I've checked my httpd.conf file and here is what is in it:
Code:# prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum number of requests a server process serves <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 MaxClients 150 MaxRequestsPerChild 1000 </IfModule>
-
12-17-2006, 07:39 AM #10Predatory Poster
- Join Date
- Jul 2003
- Location
- Goleta, CA
- Posts
- 5,566
Maxclients should be (total system ram in megabytes / average size of apache process) - 10 or so
-
12-17-2006, 05:04 PM #11Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
This morning, I've set the MaxClient to 150, which is the default. Restarted Apache and the server seems fine. I believe my server was being attack last night, possibly a dos attack or some sort.
-
12-17-2006, 06:44 PM #12Web Hosting Master
- Join Date
- Jul 2004
- Location
- Texas
- Posts
- 688
Any reason you're still running redhat 9?
-
12-17-2006, 11:37 PM #13Junior Guru
- Join Date
- Jul 2003
- Posts
- 180
No. Simply put, I haven't move to a new host or upgrade servers for few years now. Too lazy to do it anytime soon. I know I should.