LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-09-2014, 05:51 AM   #1
arthoc
LQ Newbie
 
Registered: Mar 2014
Posts: 3

Rep: Reputation: Disabled
High CPU-load w/ apache2 on Debian


Hi.
My apache is utilizing crazy amounts of CPU-usage on Server version: Apache/2.2.22 @ Debian 3.2.0-4-amd64, even though it basically only serves a static welcome page and an owncloud-frontend for a couple of users.

top gives me (the actual values vary; sometimes, the load isn't as crazy):
Code:
 PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
25657 www-data  20   0  274m  18m  10m S  41.6  0.2   0:21.75 apache2
25658 www-data  20   0  274m  17m  10m R  30.6  0.2   0:24.02 apache2
Also, I've received tons of (denied) requests from unknown URLs, even though this doesn't seem to appear too regularly.
Code:
(110)Connection timed out: proxy: HTTP: attempt to connect to 61.111.255.114:80 (*) failed
[error] (110)Connection timed out: proxy: HTTP: attempt to connect to 69.64.34.242:80 (*) failed
[error] (110)Connection timed out: proxy: HTTP: attempt to connect to 69.64.34.242:80 (*) failed
[error] [client 85.25.246.62] proxy: DNS lookup failure for: centroteaenergie.it returned by http://centroteaenergie.it/?start=101120
[error] (110)Connection timed out: proxy: HTTP: attempt to connect to 101.79.5.49:80 (*) failed
[error] [client 85.25.246.62] (20014)Internal error: proxy: error reading status line from remote server www.koike-mk.co.jp:80
[error] [client 85.25.246.62] proxy: Error reading from remote server returned by http://www.koike-mk.co.jp/cgi-bin/cgi-bin/wforum.cgi?page=0&list=new
My apache is compiled and configures like this:
apache2ctl -M
Code:
Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cache_module (shared)
 cgi_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 headers_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 proxy_module (shared)
 proxy_html_module (shared)
 proxy_http_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 status_module (shared)
Config-file:
Code:
<VirtualHost *:80>
	ServerAdmin xxxxx
	ServerName xxxxx.com
	ServerAlias www.xxxxx.com
	DocumentRoot /var/www
	ProxyRequests Off

	<Directory /var/www>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		Allow from all
	</Directory>

# -- Manual SSL-forcing
	RewriteEngine on
	RewriteCond %{SERVER_PORT} !^443$
	RewriteCond %{REQUEST_URI} !^/node/
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel debug

	CustomLog /var/log/apache2/access.log combined
</VirtualHost>

<VirtualHost *:443>
# -- regular SLL
	SSLEngine On
	SSLCertificateFile xxxxx.crt
	SSLCertificateKeyFile xxxxx.key
	ServerName xxxxx.com
	DocumentRoot /var/www/
	ProxyRequests Off

    <Directory /var/www/>
		AllowOverride All
		Order Allow,Deny
		Allow from all
	</Directory>
</VirtualHost>
I've no idea what's wrong here. Can anyone help me out here?
 
Old 03-09-2014, 06:32 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Start by stopping Apache, disabling all the modules you don't need right now like the proxy_* modules and restarting the service?
*Also see 'man iptables': the "recent" and "connlimit" modules.
 
Old 03-11-2014, 02:57 AM   #3
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
High CPU does not always mean only CPU, check your IO subsystem as well.

I agree with unSpawn you have to remove unused modules from apache + check your log file
for unusual activity.
Check also your DNS settings on server and disable DNS lookups at logging in apache.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql server not responding with high cpu usage and high load avgs landysaccount Linux - Server 2 09-15-2013 03:46 AM
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
[SOLVED] Debian Wheezy - xorg has a high cpu load Joe Soap Linux - Newbie 9 03-04-2013 11:01 PM
apache high cpu load on high traffic awww Linux - Newbie 9 10-04-2011 02:22 PM
High load and high cpu kernel usage enid Linux - Server 8 09-30-2010 03:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration