Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Problem z APACHE2
blade9999
post 2.11.2005, 20:16:01
Post #1





Grupa: Zarejestrowani
Postów: 4
Pomógł: 0
Dołączył: 13.01.2005

Ostrzeżenie: (50%)
XXX--


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:

  1. <?php
  2. # Timeout: The number of seconds before receives and sends time out.
  3.  
  4. Timeout 300
  5.  
  6. # KeepAlive: Whether or not to allow persistent connections (more than
  7. # one request per connection). Set to "Off" to deactivate.
  8.  
  9. KeepAlive Off
  10.  
  11. # MaxKeepAliveRequests: The maximum number of requests to allow
  12. # during a persistent connection. Set to 0 to allow an unlimited amount.
  13. # We recommend you leave this number high, for maximum performance.
  14.  
  15. MaxKeepAliveRequests 100
  16.  
  17. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  18. # same client on the same connection.
  19.  
  20. KeepAliveTimeout 15
  21.  
  22. ##
  23. ## Server-Pool Size Regulation (MPM specific)
  24. ## 
  25.  
  26. # prefork MPM
  27. # StartServers ......... number of server processes to start
  28. # MinSpareServers ...... minimum number of server processes which are kept spare
  29. # MaxSpareServers ...... maximum number of server processes which are kept spare
  30. # MaxClients ........... maximum number of server processes allowed to start
  31. # MaxRequestsPerChild .. maximum number of requests a server process serves
  32. <IfModule prefork.c>
  33. StartServers 8
  34. MinSpareServers  8
  35. MaxSpareServers  18
  36. MaxClients 130
  37. MaxRequestsPerChild 0
  38. </IfModule>
  39.  
  40. # pthread MPM
  41. # StartServers ......... initial number of server processes to start
  42. # MaxClients ........... maximum number of server processes allowed to start
  43. # MinSpareThreads ...... minimum number of worker threads which are kept spare
  44. # MaxSpareThreads ...... maximum number of worker threads which are kept spare
  45. # ThreadsPerChild ...... constant number of worker threads in each server proces
    s
  46. # MaxRequestsPerChild .. maximum number of requests a server process serves
  47. <IfModule worker.c>
  48. StartServers  2
  49. MaxClients  50 
  50. MinSpareThreads  25
  51. MaxSpareThreads  75
  52. ThreadsPerChild  10
  53. MaxRequestsPerChild 0
  54. </IfModule>
  55.  
  56. # perchild MPM
  57. # NumServers ........... constant number of server processes
  58. # StartThreads ......... initial number of worker threads in each server process
  59. # MinSpareThreads ...... minimum number of worker threads which are kept spare
  60. # MaxSpareThreads ...... maximum number of worker threads which are kept spare
  61. # MaxThreadsPerChild ... maximum number of worker threads in each server process
  62. # MaxRequestsPerChild .. maximum number of connections per server process (then it dies)
  63. <IfModule perchild.c>
  64. NumServers  4
  65. StartThreads  5
  66. MinSpareThreads 5
  67. MaxSpareThreads  10
  68. MaxThreadsPerChild 15
  69. MaxRequestsPerChild 0
  70. AcceptMutex fcntl
  71. </IfModule>
  72.  
  73. User www-data
  74. Group www-data
  75. ?>


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ć:
  1. <?php
  2. <IfModule prefork.c>
  3. StartServers  5
  4. MinSpareServers 5
  5. MaxSpareServers  10
  6. ServerLimit 150
  7. MaxClients  150
  8. MaxRequestsPerChild 0
  9. </IfModule> 
  10. ?>


W pliku php.ini należy ustawić:
  1. <?php
  2. mysql.allow_persistent = Off
  3. ?>


Dzięki za pomoc ktorej nie otrzymałem smile.gif jak to mawiają: "chcesz cos zrobić to zrób to samemu" smile.gif

Ten post edytował blade9999 4.11.2005, 14:13:51
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 23.06.2025 - 20:51