server reached MaxClients setting, consider raising the MaxClients setting

Ogret

New Member
Hallo zusammen ich habe leider ein grosses Problem!

Leider ist der Administrator von BSD verschwunden, und seit Montag läuft das Apache auf freebsd nicht mehr richtig.

Wenn ich Apache restarte, dann steigt der Arbeitsspeicher in das Unendliche und dann
kommt diese Fehlermeldung :

Apache Server version: Apache/1.3.37 (Unix)

swap_pager_getswapspace(3): failed
swap_pager_getswapspace(8): failed
swap_pager_getswapspace(10): failed

error.log = server reached MaxClients setting, consider raising the MaxClients setting

access.log= (Ein Paar davon)
217.162.244.229 - - [11/Mar/2008:15:54:59 +0100] "-" 408 - "-" "-"
83.180.255.174 - - [11/Mar/2008:15:55:35 +0100] "-" 408 - "-" "-"
84.73.11.177 - - [11/Mar/2008:16:39:29 +0100] "-" 408 - "-" "-"
85.0.6.79 - - [11/Mar/2008:16:40:23 +0100] "-" 408 - "-" "-"
85.0.6.79 - - [11/Mar/2008:16:41:41 +0100] "-" 408 - "-" "-"
83.79.83.146 - - [11/Mar/2008:16:41:52 +0100] "-" 408 - "-" "-"
83.78.15.230 - - [11/Mar/2008:16:42:08 +0100] "-" 408 - "-" "-"

httpd.conf =
ServerType standalone
ServerRoot /usr/local
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/apache.scoreboard
ResourceConfig /dev/null
AccessConfig /dev/null
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 50
MaxRequestsPerChild 1

Habe die Max Clients erhöht hat nichts gebracht sowie die MaxRequestsPerChild auf 1 .

Was kann ich tun? Muss dazu sagen das ich ein anfänger bin was bsd angeht!

Danke für das Verständnis. Kann mir jemand helfen?
 
Moin Ogret,

für mich sieht das nicht nach einem BSD-Problem aus, sondern nach einem genrellen Apache Problem.

Hast Du schon vor den Problemen am Apachen 'gespielt'?

Ich würde an Deiner Stelle zuerst den Wert für MaxRequestsPerChild auf 0 setzen. Der Wert besagt nämlich, wieviele Requests ein Childprozeß bearbeitet, bevor er entsorgt wird und ein neuer gestarten wird, 0 steht dabei für unendlich.

Prinzipiell würde ich sowieso ersteinmal die Defaultwerte nehmen. Wir betreiben auch einige Webserver, darunter auch welche mit erhöhten Besucherzahlen und Traffic und ich bin mit den Defaultwerten immer gut gefahren. Nur ein Server brauchte eine Anpassung.

Wenn das nichts bringt, dann Poste bitte mal ein paar Angaben zur Hardware, also CPU, RAM, Platten, Swapbelegung und zusätzlich was noch darauf läuft und die vollständige httpd.conf, gerne auch anonymisiert.

Gruß c.
 

Das sind Request timeouts. Sprich die Clients können nicht schnell genug einen Request absetzen.
Oft ist Traffic auf dem Server schuld, der die Anbindung übersteigt. Für einen DDoS sehen die Intervalle zu kurz aus.
Check aber dennoch, ob immer wieder die selben Clients diese Fehler verursachen.

Wieviel Traffic verarbeitet das Dingen und was für eine Anbindung hats?
 
Hohe Serverlast ist glaub durch Apache bedingt durch php ??? Wenn ich das Modul Php deaktiviere bleibt der Traffic aus!

Habe irgendwo gelesen das ev.:

Kommentierfunktion bzw. deren MySQL Abfrage, Die Serverlast auf 60.xx - 70.xx steigt!

Kann mir jemand sagen wo ich das anschauen kann oder wie ich das mache????

Sorry bin Anfänger!

ps habe die Module security und evasive installiert, leider nichts gebracht!
 
Installier und schraub doch nicht wüst dran rum, sondern schau doch mal nach den bisherigen Vorschlägen und beantworte kurz die Rückfragen.
Sonst kann man dir definitiv nicht helfen. Da helfen auch nicht 10 Fragezeichen.
 
Sorry was meinst du mit Anbindungen ?

Der Traffic ist immer unterschiedlich!

Es läuft OpenX um Banner zu schalten!

last pid: 26639; load averages: 0.00, 0.06, 0.39 up 1+08:12:54 18:31:58
51 processes: 1 running, 50 sleeping
CPU states: 0.2% user, 0.0% nice, 0.0% system, 0.6% interrupt, 99.2% idle
Mem: 22M Active, 12M Inact, 194M Wired, 68K Cache, 108M Buf, 742M Free
Swap: 2048M Total, 9764K Used, 2038M Free

# @(#) $Id: httpd.conf,v 1.13 2007/11/16 14:40:18 nicolas Exp $
LoadModule mmap_static_module libexec/apache/mod_mmap_static.so
LoadModule vhost_alias_module libexec/apache/mod_vhost_alias.so
LoadModule env_module libexec/apache/mod_env.so
LoadModule define_module libexec/apache/mod_define.so
LoadModule config_log_module libexec/apache/mod_log_config.so
LoadModule mime_magic_module libexec/apache/mod_mime_magic.so
LoadModule mime_module libexec/apache/mod_mime.so
LoadModule negotiation_module libexec/apache/mod_negotiation.so
LoadModule status_module libexec/apache/mod_status.so
LoadModule info_module libexec/apache/mod_info.so
LoadModule includes_module libexec/apache/mod_include.so
LoadModule autoindex_module libexec/apache/mod_autoindex.so
LoadModule dir_module libexec/apache/mod_dir.so
LoadModule cgi_module libexec/apache/mod_cgi.so
LoadModule asis_module libexec/apache/mod_asis.so
LoadModule imap_module libexec/apache/mod_imap.so
LoadModule action_module libexec/apache/mod_actions.so
LoadModule speling_module libexec/apache/mod_speling.so
LoadModule userdir_module libexec/apache/mod_userdir.so
LoadModule alias_module libexec/apache/mod_alias.so
LoadModule rewrite_module libexec/apache/mod_rewrite.so
LoadModule access_module libexec/apache/mod_access.so
LoadModule auth_module libexec/apache/mod_auth.so
LoadModule anon_auth_module libexec/apache/mod_auth_anon.so
LoadModule db_auth_module libexec/apache/mod_auth_db.so
LoadModule digest_module libexec/apache/mod_digest.so
LoadModule proxy_module libexec/apache/libproxy.so
LoadModule cern_meta_module libexec/apache/mod_cern_meta.so
LoadModule expires_module libexec/apache/mod_expires.so
LoadModule headers_module libexec/apache/mod_headers.so
LoadModule usertrack_module libexec/apache/mod_usertrack.so
LoadModule unique_id_module libexec/apache/mod_unique_id.so
LoadModule setenvif_module libexec/apache/mod_setenvif.so
LoadModule ssl_module libexec/apache/libssl.so
#LoadModule php5_module libexec/apache/libphp5.so (Abgeschaltet)
LoadModule perl_module libexec/apache/libperl.so
LoadModule evasive_module libexec/apache/mod_evasive.so
LoadModule security_module libexec/apache/mod_security.so
ClearModuleList
AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_define.c
AddModule mod_log_config.c
AddModule mod_mime_magic.c
AddModule mod_mime.c
AddModule mod_negotiation.c
AddModule mod_status.c
AddModule mod_info.c
AddModule mod_include.c
AddModule mod_autoindex.c
AddModule mod_dir.c
AddModule mod_cgi.c
AddModule mod_asis.c
AddModule mod_imap.c
AddModule mod_actions.c
AddModule mod_speling.c
AddModule mod_userdir.c
AddModule mod_alias.c
AddModule mod_rewrite.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_auth_anon.c
AddModule mod_auth_db.c
AddModule mod_digest.c
AddModule mod_proxy.c
AddModule mod_cern_meta.c
AddModule mod_expires.c
AddModule mod_headers.c
AddModule mod_usertrack.c
AddModule mod_unique_id.c
AddModule mod_so.c
AddModule mod_setenvif.c
AddModule mod_ssl.c
#AddModule mod_php5.c (Abgeschaltet)
AddModule mod_perl.c
AddModule mod_evasive.c
AddModule mod_security.c
ServerType standalone
ServerRoot /usr/local
PidFile /var/run/httpd.pid
ScoreBoardFile /var/run/apache.scoreboard
ResourceConfig /dev/null
AccessConfig /dev/null
Timeout 300
KeepAlive On
MaxKeepAliveRequests 50
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 50
MaxRequestsPerChild 0
BindAddress *******
Port 80
Listen *******
Listen *******
User www
Group www
ServerAdmin *******
ServerName *******
DocumentRoot /usr/local/www/data
<IfModule mod_dir.c>
DirectoryIndex index.html
</IfModule>
AccessFileName .htaccess
<Files ~ "^\.ht">
Order Allow,Deny
Deny from All
</Files>
UseCanonicalName On
<IfModule mod_mime.c>
TypesConfig /usr/local/etc/apache/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile /usr/local/etc/apache/magic
</IfModule>
HostnameLookups Off
ErrorLog "|/usr/local/sbin/rotatelogs /var/log/apache/error 86400"
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog "|/usr/local/sbin/rotatelogs /var/log/apache/access 86400" combined
ServerSignature On
<IfModule mod_setenvif.c>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
</IfModule>
<IfDefine SSL>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfDefine>
<IfModule mod_ssl.c>
SSLPassPhraseDialog builtin
SSLSessionCache dbm:/var/run/apache_ssl_scache
SSLSessionCacheTimeout 300
SSLMutex file:/var/run/apache_ssl_mutex
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLLog "|/usr/local/sbin/rotatelogs /var/log/apache/apache_ssl_engine_log 86400"
SSLLogLevel info
</IfModule>
<IfModule mod_evasive.c>
DOSHashTableSize 3097
DOSPageCount 5
DOSSiteCount 10
DOSPageInterval 100
DOSSiteInterval 100
DOSBlockingPeriod 6000
</IfModule>
<IfModule mod_security.c>
# Turn the filtering engine On or Off
SecFilterEngine On

# Change Server: string
SecServerSignature "Apache"


# This setting should be set to On only if the Web site is
# using the Unicode encoding. Otherwise it may interfere with
# the normal Web site operation.
SecFilterCheckUnicodeEncoding Off

# The audit engine works independently and
# can be turned On of Off on the per-server or
# on the per-directory basis. "On" will log everything,
# "DynamicOrRelevant" will log dynamic requests or violations,
# and "RelevantOnly" will only log policy violations
SecAuditEngine RelevantOnly

# The name of the audit log file


# Should mod_security inspect POST payloads
SecFilterScanPOST On

# Action to take by default
SecFilterDefaultAction "deny,log,status:403"

## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ##

# Require HTTP_USER_AGENT and HTTP_HOST in all requests
# SecFilterSelective "HTTP_USER_AGENT|HTTP_HOST" "^$"

# Require Content-Length to be provided with
# every POST request
SecFilterSelective REQUEST_METHOD "^POST$" chain
SecFilterSelective HTTP_Content-Length "^$"

# Don't accept transfer encodings we know we don't handle
# (and you don't need it anyway)
SecFilterSelective HTTP_Transfer-Encoding "!^$"

# The name of the audit log file
SecAuditLog /var/log/httpd/audit_log

# Protecting from XSS attacks through the PHP session cookie
SecFilterSelective ARG_PHPSESSID "!^[0-9a-z]*$"
SecFilterSelective COOKIE_PHPSESSID "!^[0-9a-z]*$"

SecFilter "viewtopic\.php\?" chain
SecFilter "chr\(([0-9]{1,3})\)" "deny,log"

# Block various methods of downloading files to a server
SecFilterSelective THE_REQUEST "ping "
SecFilterSelective THE_REQUEST "wget "
SecFilterSelective THE_REQUEST "lynx "
SecFilterSelective THE_REQUEST "scp "
SecFilterSelective THE_REQUEST "ftp "
SecFilterSelective THE_REQUEST "cvs "
SecFilterSelective THE_REQUEST "rcp "
SecFilterSelective THE_REQUEST "curl "
SecFilterSelective THE_REQUEST "telnet "
SecFilterSelective THE_REQUEST "ssh "
SecFilterSelective THE_REQUEST "echo "
SecFilterSelective THE_REQUEST "links -dump "
SecFilterSelective THE_REQUEST "links -dump-charset "
SecFilterSelective THE_REQUEST "links -dump-width "
SecFilterSelective THE_REQUEST "links http:// "
SecFilterSelective THE_REQUEST "links ftp:// "
SecFilterSelective THE_REQUEST "links -source "
SecFilterSelective THE_REQUEST "mkdir "
SecFilterSelective THE_REQUEST "cd /tmp "
SecFilterSelective THE_REQUEST "cd /var/tmp "
SecFilterSelective THE_REQUEST "cd /etc/httpd/proxy "
</IfModule>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName *******
ServerAlias *******
DocumentRoot /usr/local/www/data
<Location />
Options +Indexes
IndexOptions +FancyIndexing
Order Deny,Allow
AuthType Basic
AuthName "*******"
AuthUserFile /usr/local/etc/apache/passwd
<Limit GET>
Order Deny,Allow
Allow from All
Require valid-user
</Limit>
</Location>
</VirtualHost>

<VirtualHost *:80>
ServerName *******
DocumentRoot /usr/local/www/phpadsnew
ErrorLog /var/log/apache/ad.error.log
TransferLog /var/log/apache/ad.transfer.log
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
DirectoryIndex index.html index.php
</VirtualHost>
Der wird benutzt!

<VirtualHost *:80>
ServerName *******
DocumentRoot /home/mani/www/data
ErrorLog /home/mani/www/log/error.log
TransferLog /home/mani/www/log/transfer.log
</VirtualHost>

<VirtualHost *:80>
ServerName *******
ServerAlias *******
DocumentRoot /usr/local/www*******/data
ErrorLog /usr/local/www/*******/log/error.log
TransferLog /usr/local/www/*******/log/transfer.log
</VirtualHost>

<VirtualHost *:80>
RewriteEngine On
RewriteRule /(.*) /index.html [L,PT]
ServerName *******
serverAlias *******
DocumentRoot /usr/local/www/*******data
ErrorLog /usr/local/www/*******/log/error.log
TransferLog /usr/local/www/*******p/log/transfer.log
</VirtualHost>

<VirtualHost _default_:80>
RewriteEngine On
RewriteRule /pac/proxy.pac - [L,PT]
RewriteRule /(.*) /styxadm/$1 [L,PT]
RedirectMatch /styxadm/.* https://fw.int.XXXX.ch:443/
<Location />
Options +Indexes
Order Deny,Allow
AuthType Basic
AuthName "SwissGuide"
AuthUserFile /usr/local/etc/apache/passwd
<Limit GET>
Order Deny,Allow
Allow from All
Require valid-user
</Limit>
</Location>
</VirtualHost>
<VirtualHost _default_:443>
ServerName *******
ServerAdmin *******
DocumentRoot /usr/local/www/data
ErrorLog "|/usr/local/sbin/rotatelogs /var/log/apache/error 86400"
SSLEngine on
SSLCertificateFile /usr/local/etc/apache/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/server.key
# SSLCACertificateFile /usr/local/etc/apache/ssl.crt/ca.crt
<Files ~ "\.(cgi|shtml)$">
SSLOptions +StdEnvVars
</Files>
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog "|/usr/local/sbin/rotatelogs /var/log/apache/apache_ssl_request_log 86400" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
<Location />
Options +Indexes
IndexOptions +FancyIndexing
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from 212.55.208.170
</Location>
ScriptAlias /index.html /usr/local/www/perl-bin/styxadmin.cgi
<Location /perl-status>
SetHandler perl-script
PerlHandler Apache::Status
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from 212.55.208.170
</Location>
Alias /perl-bin/ /usr/local/www/perl-bin/
PerlHandler Apache::Registry
PerlTaintCheck On
PerlFreshRestart On
PerlRequire /usr/local/www/perl-bin/preload.pl
<Location /perl-bin>
SetHandler perl-script
Options +ExecCGI
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from 212.55.208.170
</Location>
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from 212.55.208.170
</Location>
<Location /server-info>
SetHandler server-info
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from 212.55.208.170
</Location>
</VirtualHost>
 
Last edited:
Sorry was meinst du mit Anbindungen ?
Wie schnell die Leitung ins Internet ist.
Der Traffic ist immer unterschiedlich!

In welchem ungefähren Rahmen denn?

Was ist auf dem virtuellen Host alles so drauf? Mir erscheint, dass der Server überkonfiguriert ist und ne Abspeckung vertragen könnte.

Ohne dir zu nahe treten zu wollen, wärs nicht vernünftiger jemanden mit Ahnung von der Sache zu angagieren, der sich das ganze anschaut?

Es geht schliesslich um ne Kiste, die im Haifischbecken steht und da sollte man schon ziemlich genau wissen, was man macht...
 
Erledigt ;-)

Wie gesagt

Kommentierfunktion der MYSQL Abfrage gabs ein Fehler!

Ich lerne schnell, aber danke für deine Empfehlung!
 
Back
Top