Abbadon
Registered User
Hi!
Ich habe vor kurzem zu meiner Installation von Lighttpd und PHP5 noch MySQL installiert. Seitdem habe ich das Problem, dass Lighttpd mir den ganzen Arbeitsspeichen "frisst"... Der Speicherverbrauch steigt ständig, bis der ganze RAM belegt ist. Ich habe schon versucht an der config etwas zu ändern, aber es wird nicht besser.
Mein Vserver hat 1GHz CPU, 10GB Festplatte und 1GB RAM.
Ich Poste mal die verschiedenen Configs. Dann kann mir vllt jemand mal einen Tip geben.
lighttpd.conf:
10-fastcgi.conf:
my.cnf
Ich habe vor kurzem zu meiner Installation von Lighttpd und PHP5 noch MySQL installiert. Seitdem habe ich das Problem, dass Lighttpd mir den ganzen Arbeitsspeichen "frisst"... Der Speicherverbrauch steigt ständig, bis der ganze RAM belegt ist. Ich habe schon versucht an der config etwas zu ändern, aber es wird nicht besser.
Mein Vserver hat 1GHz CPU, 10GB Festplatte und 1GB RAM.
Ich Poste mal die verschiedenen Configs. Dann kann mir vllt jemand mal einen Tip geben.
Code:
top - 20:47:01 up 2:31, 1 user, load average: 0.60, 0.64, 0.30
Tasks: 54 total, 2 running, 52 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.7%us, 0.7%sy, 0.0%ni, 88.9%id, 9.8%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1048576k total, 1048576k used, 0k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 0k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17555 www-data 15 0 795m 788m 2444 S 0.7 77.0 0:08.97 lighttpd
17592 www-data 15 0 37612 5544 2984 S 0.3 0.5 0:00.53 php-cgi
17595 www-data 15 0 37868 5924 3064 S 0.3 0.6 0:00.83 php-cgi
1 root 15 0 1980 696 592 S 0.0 0.1 0:00.04 init
1949 root 15 0 2256 1108 880 R 0.0 0.1 0:03.71 top
5515 www-data 25 0 36184 5832 3952 S 0.0 0.6 0:00.01 php-cgi
5516 www-data 15 0 37136 5860 2848 S 0.0 0.6 0:00.03 php-cgi
5517 www-data 15 0 38156 6020 2988 S 0.0 0.6 0:00.79 php-cgi
5518 www-data 15 0 37612 5320 2792 S 0.0 0.5 0:00.27 php-cgi
5519 www-data 15 0 37612 5312 2784 S 0.0 0.5 0:00.93 php-cgi
5521 www-data 20 0 36184 5832 3952 S 0.0 0.6 0:00.02 php-cgi
5522 www-data 15 0 38156 5132 3028 S 0.0 0.5 0:00.44 php-cgi
5523 www-data 15 0 37612 5372 2920 S 0.0 0.5 0:00.86 php-cgi
5524 www-data 16 0 36852 5600 2948 S 0.0 0.5 0:00.02 php-cgi
5525 www-data 15 0 38156 6064 3036 S 0.0 0.6 0:00.91 php-cgi
5526 www-data 20 0 36184 5828 3952 S 0.0 0.6 0:00.02 php-cgi
5528 www-data 15 0 37736 5888 3140 S 0.0 0.6 0:00.89 php-cgi
5529 www-data 15 0 37884 6200 3152 S 0.0 0.6 0:00.94 php-cgi
5530 www-data 15 0 37876 5932 3092 S 0.0 0.6 0:00.31 php-cgi
5531 www-data 16 0 38156 6156 3132 S 0.0 0.6 0:01.19 php-cgi
7777 daemon 15 0 1764 496 408 S 0.0 0.0 0:00.00 portmap
7856 root 15 0 33132 1224 936 S 0.0 0.1 0:00.00 rsyslogd
7865 root 15 0 5272 892 680 S 0.0 0.1 0:00.00 sshd
9439 Debian-e 15 0 6132 796 612 S 0.0 0.1 0:00.00 exim4
9455 www-data 16 0 3312 940 720 S 0.0 0.1 0:00.00 famd
9480 root 18 0 2036 868 704 S 0.0 0.1 0:00.00 cron
9705 root 16 0 8016 2308 2124 S 0.0 0.2 0:00.05 sshd
9709 Abbadon 15 0 8164 1436 1160 S 0.0 0.1 0:00.05 sshd
9710 Abbadon 15 0 4696 1352 1128 S 0.0 0.1 0:00.02 sftp-server
9727 root 16 0 8016 2340 2156 S 0.0 0.2 0:00.06 sshd
9730 Abbadon 15 0 8164 1448 1188 R 0.0 0.1 0:00.80 sshd
9731 Abbadon 15 0 3308 1240 1188 S 0.0 0.1 0:00.00 sh
9953 root 16 0 2380 1044 840 S 0.0 0.1 0:00.00 su
9955 root 15 0 2772 1496 1172 S 0.0 0.1 0:00.00 bash
11966 root 15 0 8164 2724 2200 S 0.0 0.3 0:00.12 sshd
11971 root 15 0 4700 1524 1128 S 0.0 0.1 0:00.01 sftp-server
17561 www-data 18 0 36184 5832 3952 S 0.0 0.6 0:00.02 php-cgi
17569 www-data 18 0 36184 5832 3952 S 0.0 0.6 0:00.01 php-cgi
17575 www-data 18 0 36184 5828 3952 S 0.0 0.6 0:00.01 php-cgi
17591 www-data 15 0 37884 6204 3156 S 0.0 0.6 0:03.11 php-cgi
17593 www-data 15 0 36852 5764 3056 S 0.0 0.5 0:00.06 php-cgi
17594 www-data 17 0 36588 5408 2976 S 0.0 0.5 0:00.08 php-cgi
17596 www-data 18 0 36860 5932 3024 S 0.0 0.6 0:00.03 php-cgi
17597 www-data 18 0 36588 5296 2868 S 0.0 0.5 0:00.01 php-cgi
17598 www-data 17 0 36588 5256 2832 S 0.0 0.5 0:00.01 php-cgi
17600 www-data 18 0 36712 5712 3092 S 0.0 0.5 0:00.07 php-cgi
17601 www-data 18 0 37132 6108 3100 S 0.0 0.6 0:00.07 php-cgi
17602 www-data 15 0 37612 5492 2936 S 0.0 0.5 0:01.63 php-cgi
17604 www-data 16 0 37132 5972 3076 S 0.0 0.6 0:00.04 php-cgi
19964 root 23 0 2476 1152 964 S 0.0 0.1 0:00.00 mysqld_safe
20010 mysql 15 0 22736 6620 4500 S 0.0 0.6 0:00.31 mysqld
20011 root 24 0 1628 536 460 S 0.0 0.1 0:00.00 logger
20309 root 15 0 8016 2676 2204 S 0.0 0.3 0:00.12 sshd
20312 root 15 0 4696 1428 1128 S 0.0 0.1 0:00.00 sftp-server
lighttpd.conf:
Code:
server.modules = (
"mod_status"
)
server.event-handler = "linux-sysepoll"
server.network-backend = "writev"
server.max-fds = 1024
server.max-keep-alive-requests = 4
server.max-keep-alive-idle = 4
server.max-read-idle = 60
server.max-write-idle = 360
server.use-noatime = "enable"
server.max-stat-threads = 4
server.max-read-threads = 4
server.stat-cache-engine = "fam"
10-fastcgi.conf:
Code:
server.modules += ( "mod_fastcgi" )
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket" + var.PID,
"max-procs" => 3,
"idle-timeout" => 20,
"bin-environment" =>
(
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "5000"
),
"bin-copy-environment" =>
(
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
my.cnf
Code:
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * 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 = 1M
max_allowed_packet = 8M
thread_stack = 64K
thread_cache_size = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover = BACKUP
#max_connections = 20
#table_cache = 512
#thread_concurrency = 10
#
# * Query Cache Configuration
#
query_cache_limit = 1M
query_cache_size = 8M
#
# * 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.
# note: if you are setting up a replication slave, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
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
[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
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/