Witam.
Mam taki problem, otóż mam bardzo popularne forum na IPB 2.1 które stoi na serwerze dedykowanym. Jest postawiony apache 2.0.54 php 4.3.10-16 (apache2handler) i mysql 4.0.24_Debian-10sarge1-log
Problem jest taki że wieczorem około godizny 20:00 - 23:00 apache pochłania cały RAM i cały SWAP. Jak swap sie kończy to albo się wiesza serwer albo wywala mysqla co niszczy tabele sesji w IPB. Próbowałem już rozmaitych konfiguracji modułu prefork.c ale nie moge znaleźć gdzie jest problem czy to jest w konfiguracji czy gdzieś indziej ?
Oto obecny konfig apache:
<?php
# 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 Off
# 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 prefork.c>
StartServers 8
MinSpareServers 8
MaxSpareServers 18
MaxClients 130
MaxRequestsPerChild 0
</IfModule>
# pthread MPM
# StartServers ......... initial number of server processes to start
# MaxClients ........... maximum number of server processes allowed to start
# 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 proces
s
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 50
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 10
MaxRequestsPerChild 0
</IfModule>
# perchild MPM
# NumServers ........... constant number of server processes
# StartThreads ......... initial number of worker threads in each server process
# MinSpareThreads ...... minimum number of worker threads which are kept spare
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
# MaxThreadsPerChild ... maximum number of worker threads in each server process
# MaxRequestsPerChild .. maximum number of connections per server process (then it dies)
<IfModule perchild.c>
NumServers 4
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 15
MaxRequestsPerChild 0
AcceptMutex fcntl
</IfModule>
User www-data
Group www-data
?>
Bardzo proszę o pomoc, szukam także kompetentnego administratora serwera.
Edit:
No i problem samemu rozwiązałem... dla wszystkich którzy beda miec podobny problem podaje rozwiązanie:
W pliku httpd.conf należy dopisać:
<?php
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
ServerLimit 150
MaxClients 150
MaxRequestsPerChild 0
</IfModule>
?>
W pliku php.ini należy ustawić:
<?php
mysql.allow_persistent
= Off
?>
Dzięki za pomoc ktorej nie otrzymałem

jak to mawiają: "chcesz cos zrobić to zrób to samemu"
Ten post edytował blade9999 4.11.2005, 14:13:51