Fireball22
Registered User
Hallo Leute,
auf meinem Strato-V-Server A läuft Debian 4.0 inkl. Plesk 8 und leider killt sich in den letzten Tagen verhäuft der Apache2 ab, da nicht mehr ausreichend RAM für Childprozesse zur Verfügung steht.
Ausschnitt aus der Log:
Allerdings würde ich schon gerne die gleiche Performance meines Apaches und des MySQL-Servers beibehalten.
Deshalb wollte ich fragen, wo man noch kleinere Eingriffe in der Konfiguration vornehmen kann, um den RAM-Verbrauch einzuschränken bzw. einfach das Abstürzen des Apaches zu vermeiden.
Hier Auszüge aus der Apache2 Config:
Und aus der MySQL-Config:
So sieht es im Moment mit der Speicherverteilung aus:
Ich würde mich über eure Hilfe sehr freuen!
MfG
Michael
auf meinem Strato-V-Server A läuft Debian 4.0 inkl. Plesk 8 und leider killt sich in den letzten Tagen verhäuft der Apache2 ab, da nicht mehr ausreichend RAM für Childprozesse zur Verfügung steht.
Ausschnitt aus der Log:
Code:
[Tue Jul 01 20:42:30 2008] [emerg] (12)Cannot allocate memory: couldn't grab the accept mutex
[Tue Jul 01 20:42:31 2008] [alert] Child 7998 returned a Fatal error... Apache is exiting!
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:32 2008] [emerg] (43)Identifier removed: couldn't grab the accept mutex
[Tue Jul 01 20:42:42 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:44 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:44 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:44 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:44 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:45 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:50 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:42:51 2008] [emerg] (22)Invalid argument: couldn't release the accept mutex
[Tue Jul 01 20:43:13 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:43:13 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:43:14 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:43:17 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:43:20 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:43:41 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
[Tue Jul 01 20:43:41 2008] [emerg] (22)Invalid argument: couldn't grab the accept mutex
Allerdings würde ich schon gerne die gleiche Performance meines Apaches und des MySQL-Servers beibehalten.
Deshalb wollte ich fragen, wo man noch kleinere Eingriffe in der Konfiguration vornehmen kann, um den RAM-Verbrauch einzuschränken bzw. einfach das Abstürzen des Apaches zu vermeiden.
Hier Auszüge aus der Apache2 Config:
Code:
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# 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 mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
User www-data
Group www-data
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
TypesConfig /etc/mime.types
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
Und aus der MySQL-Config:
Code:
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
# bind-address = 127.0.0.1
#
# * Fine Tuning
#
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
thread_cache_size = 8
#max_connections = 100
#table_cache = 64
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
#log = /var/log/mysql/mysql.log
#
# Error logging goes to syslog. This is a Debian improvement :)
#
# Here you can see queries with especially long duration
#log_slow_queries = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
#server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
# WARNING: Using expire_logs_days without bin_log crashes the server! See README.Debian!
expire_logs_days = 10
max_binlog_size = 100M
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
#
# * BerkeleyDB
#
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M
#
# * NDB Cluster
#
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
#
# The following configuration is read by the NDB Data Nodes (ndbd processes)
# not from the NDB Management Nodes (ndb_mgmd processes).
#
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1
So sieht es im Moment mit der Speicherverteilung aus:
Code:
VPS Speichernutzung:
Momentan genutzt: 319,875 MB
Zugesichert: 259,375 MB
Maximal nutzbar: 791,281 MB
Ich würde mich über eure Hilfe sehr freuen!
MfG
Michael