MPM-Event für Apache einrichten: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 86: | Zeile 86: | ||
<code>service httpd restart</code> | <code>service httpd restart</code> | ||
Nützliches Trivia: | |||
:[https://serverpilot.io/docs/fix-apache-error-server-reached-maxrequestworkers-setting/] | |||
:[https://httpd.apache.org/docs/2.4/de/mod/prefork.html] | |||
Außerdem interessant in Zusammenhang mit Apache Problemen | Außerdem interessant in Zusammenhang mit Apache Problemen | ||
Version vom 17. Juni 2021, 15:07 Uhr
- 1. Bearbeite die entsprechende Datei via SSH
mcedit /etc/httpd/conf.modules.d/00-mpm.conf
- 2. Kommentiere folgenden Eintrag durch Setzen einer Raute "#" aus und deaktiviere somit den Modus prefork
- LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
- 3. Aktiviere durch Entfernen der Raute vor diesem Eintrag den Modus "worker"
- LoadModule mpm_worker_module modules/mod_mpm_worker.so
- 4. Ergänze die Folgenden Blöcke im unteren Bereich
<IfModule mpm_worker_module>
StartServers 8
MinSpareThreads 50
MaxSpareThreads 100
ThreadLimit 64
ThreadsPerChild 64
MaxRequestWorkers 384
MaxConnectionsPerChild 10000
ServerLimit 6
GracefulShutdownTimeout 5
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
# these are known to be safe with MSIE 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml
# everything else may cause problems with MSIE 6
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xml
</IfModule>
</IfModule>
Hinterher sieht die Datei dann so aus
# Select the MPM module which should be used by uncommenting exactly
# one of the following LoadModule lines:
# prefork MPM: Implements a non-threaded, pre-forking web server
# See: http://httpd.apache.org/docs/2.4/mod/prefork.html
# LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
# worker MPM: Multi-Processing Module implementing a hybrid
# multi-threaded multi-process web server
# See: http://httpd.apache.org/docs/2.4/mod/worker.html
#
LoadModule mpm_worker_module modules/mod_mpm_worker.so
# event MPM: A variant of the worker MPM with the goal of consuming
# threads only for connections with active processing
# See: http://httpd.apache.org/docs/2.4/mod/event.html
#
# LoadModule mpm_event_module modules/mod_mpm_event.so
<IfModule mpm_worker_module>
StartServers 8
MinSpareThreads 50
MaxSpareThreads 100
ThreadLimit 64
ThreadsPerChild 64
MaxRequestWorkers 384
MaxConnectionsPerChild 10000
ServerLimit 6
GracefulShutdownTimeout 5
</IfModule>
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
# these are known to be safe with MSIE 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml
# everything else may cause problems with MSIE 6
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/x-javascript application/javascript application/ecmascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/xml
</IfModule>
</IfModule>
- 5. Starte den Apache neu
service httpd restart
Nützliches Trivia:
Außerdem interessant in Zusammenhang mit Apache Problemen