ubuntuusers.de

Apache 100% CPU Auslastung

Status: Gelöst | Ubuntu-Version: Server 16.04 (Xenial Xerus)
Antworten |

KSCNeon

Anmeldungsdatum:
14. Februar 2017

Beiträge: Zähle...

Werte Community, ich habe einen Ubuntu Server mit Apache 2 sowie GnuTLS. Auf dem Server werden mehrere Domains ink. SSL verwaltet, unter anderem 2 Wordpress Installationen und Rainloop. Seit einigen Tagen plagt sich der Server etwas, da die CPU Auslastung Tag und Nacht bei 100% liegt. Ich konnte bisher kein Muster erkennen und wüsste auch nicht wovon es kommen könnte. Die Apache und vhost Error Logs sind leer. Immer wenn ich Apache stoppe und wieder starte ist die CPU Auslastung einige Minuten bis Stunden normal (1-15%), aber dann geht sie wieder hoch und wenn sie dann wieder bei 100& ist bleibt sie dabei bis ich Apache wieder neu starte. Es sei dazu gesagt, das es kein einzelner Prozess ist sondern Apache in mehreren Prozessen läuft (Siehe Bild) Ein Error Log zeigt dennoch fehler:

[Thu Feb 16 10:32:31.945604 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 10:32:31.945645 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:26:31.132439 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:26:31.417977 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:26:31.418005 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:26:36.718715 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:26:36.863341 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:26:36.863366 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:26:42.356907 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:26:42.497225 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:26:42.497254 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:28:25.351085 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:28:25.563111 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:28:25.563136 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:29:57.459715 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:29:57.653040 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:29:57.653068 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:39:38.902490 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:39:39.109482 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:39:39.109515 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:49:30.520283 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:49:30.740616 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:49:30.740643 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:50:45.630280 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:50:45.791664 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:50:45.791686 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 11:53:33.509557 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 11:53:33.755140 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 11:53:33.755160 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:00:46.800569 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 12:00:47.035943 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:00:47.035969 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:02:47.116971 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 12:02:47.328102 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:02:47.328174 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:05:09.263101 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 12:05:09.482316 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:05:09.482343 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:24:35.702183 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
AH00112: Warning: DocumentRoot [/var/www/cloudload/polr] does not exist
[Thu Feb 16 12:24:35.986359 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:24:35.986397 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:30:54.996521 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 12:30:55.230113 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:30:55.230145 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:38:45.462780 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 12:38:45.712525 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:38:45.712553 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 12:58:37.083780 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 12:58:37.343103 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 12:58:37.343133 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 14:18:23.360435 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 14:18:23.738900 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 14:18:23.738927 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 14:22:03.274916 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 14:22:03.558797 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 14:22:03.558825 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 14:23:16.100636 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 14:23:16.277899 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 14:23:16.277925 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 14:45:02.303549 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 14:45:02.659987 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 14:45:02.660015 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
postdrop: warning: unable to look up public/pickup: No such file or directory
[Thu Feb 16 15:12:47.560548 2017] [mpm_prefork:notice] [pid 2579] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 15:12:47.984919 2017] [mpm_prefork:notice] [pid 2579] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 15:12:47.984949 2017] [core:notice] [pid 2579] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 15:13:00.086582 2017] [mpm_prefork:notice] [pid 2579] AH00169: caught SIGTERM, shutting down
[Thu Feb 16 15:13:06.790610 2017] [mpm_prefork:notice] [pid 16088] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 15:13:06.790735 2017] [core:notice] [pid 16088] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 15:13:09.537475 2017] [mpm_prefork:notice] [pid 16088] AH00171: Graceful restart requested, doing restart
[Thu Feb 16 15:13:09.694633 2017] [mpm_prefork:notice] [pid 16088] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 15:13:09.694654 2017] [core:notice] [pid 16088] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 16:11:22.033156 2017] [mpm_prefork:notice] [pid 16088] AH00169: caught SIGTERM, shutting down
[Thu Feb 16 16:11:26.181179 2017] [mpm_prefork:notice] [pid 16385] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 16:11:26.182745 2017] [core:notice] [pid 16385] AH00094: Command line: '/usr/sbin/apache2'
[Thu Feb 16 20:06:46.331280 2017] [mpm_prefork:error] [pid 16385] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[Thu Feb 16 20:56:34.040413 2017] [mpm_prefork:notice] [pid 16385] AH00169: caught SIGTERM, shutting down
[Thu Feb 16 20:56:40.407011 2017] [mpm_prefork:notice] [pid 5422] AH00163: Apache/2.4.18 (Ubuntu) mod_gnutls/0.7.3 GnuTLS/3.4.10 configured -- resuming normal operations
[Thu Feb 16 20:56:40.407103 2017] [core:notice] [pid 5422] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 17 07:35:01.749292 2017] [mpm_prefork:notice] [pid 5422] AH00171: Graceful restart requested, doing restart

Ich wäre euch sehr Dankbar wenn ihr einen Tipp hättet, mit Strace habe ich mich auch schon an die Sache gewagt, dennoch komme ich damit zu keinem Ergebniss weil Strace den Log erst abschließt wenn sich der Prozess schließt, und dieser läuft ja permanent und beendet sich nicht von alleine.

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17529

Die ersten Fragen die sich mir stellen:

  1. Warum sind da so viele graceful Restarts?

  2. Warum siehst du im access.log oder error.log nichts?

Dann noch:

[Thu Feb 16 20:06:46.331280 2017] [mpm_prefork:error] [pid 16385] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Reden wir von Low Traffic Seiten, oder sind deine Seiten gut/viel besucht?

mfg Stefan

KSCNeon

(Themenstarter)

Anmeldungsdatum:
14. Februar 2017

Beiträge: 9

encbladexp schrieb:

Die ersten Fragen die sich mir stellen:

  1. Warum sind da so viele graceful Restarts?

  2. Warum siehst du im access.log oder error.log nichts?

Dann noch:

[Thu Feb 16 20:06:46.331280 2017] [mpm_prefork:error] [pid 16385] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

Reden wir von Low Traffic Seiten, oder sind deine Seiten gut/viel besucht?

mfg Stefan

Die Restarts von Apache habe ich selbst ausgeführt um nach kleinen Änderungen immer wieder zu schauen ob es in Zukunft läuft. Ich habe heute doch einige Logs zur Hand:

Strace Apache:

--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=2963, si_uid=0} ---
close(20)                               = 0
munmap(0x7f7666c55000, 67108864)        = 0
close(18)                               = 0
munmap(0x7f766b59c000, 2126312)         = 0
munmap(0x7f766b387000, 2179096)         = 0
munmap(0x7f766b14a000, 2344296)         = 0
munmap(0x7f766ae69000, 3015360)         = 0
munmap(0x7f766ac55000, 2175544)         = 0
munmap(0x7f766b7a4000, 2142720)         = 0
munmap(0x7f766bbc3000, 2126192)         = 0
munmap(0x7f766b9b0000, 2172552)         = 0
munmap(0x7f766bdcb000, 2130472)         = 0
munmap(0x7f766bfd4000, 2126032)         = 0
munmap(0x7f766c1dc000, 2113776)         = 0
munmap(0x7f766c3e1000, 2109680)         = 0
munmap(0x7f766c5e5000, 2105552)         = 0
munmap(0x7f766c7e8000, 2113744)         = 0
munmap(0x7f766c9ed000, 2183504)         = 0
munmap(0x7f766cc03000, 2150936)         = 0
munmap(0x7f766ce11000, 2109656)         = 0
munmap(0x7f766d68b000, 2130248)         = 0
munmap(0x7f766d453000, 2322464)         = 0
munmap(0x7f766d22a000, 2264256)         = 0
munmap(0x7f766d015000, 2179952)         = 0
munmap(0x7f766d894000, 2130320)         = 0
munmap(0x7f766da9d000, 2371424)         = 0
munmap(0x7f766dce0000, 2122216)         = 0
munmap(0x7f766dee7000, 2238728)         = 0
munmap(0x7f76711de000, 2158896)         = 0
munmap(0x7f766e471000, 2134248)         = 0
munmap(0x7f766e67b000, 2138392)         = 0
munmap(0x7f766e886000, 2109648)         = 0
munmap(0x7f76708b0000, 2199768)         = 0
munmap(0x7f767064a000, 2513800)         = 0
munmap(0x7f7670438000, 2167664)         = 0
munmap(0x7f766ffd0000, 2369512)         = 0
munmap(0x7f766fd26000, 2789864)         = 0
munmap(0x7f7670213000, 2244992)         = 0
munmap(0x7f766f85a000, 2567024)         = 0
munmap(0x7f766facd000, 2458248)         = 0
munmap(0x7f766f5fe000, 2472632)         = 0
munmap(0x7f766f2c4000, 3382584)         = 0
munmap(0x7f766f0b6000, 2153352)         = 0
munmap(0x7f766ee94000, 2233000)         = 0
munmap(0x7f766ec90000, 2109720)         = 0
munmap(0x7f766ea8a000, 2117784)         = 0
munmap(0x7f7670aca000, 2154704)         = 0
munmap(0x7f7670cd9000, 5260800)         = 0
munmap(0x7f766e10a000, 3564640)         = 0
munmap(0x7f76713ee000, 2284072)         = 0
munmap(0x7f7671f38000, 2183392)         = 0
munmap(0x7f7671cc9000, 2548808)         = 0
munmap(0x7f7671a60000, 2523600)         = 0
munmap(0x7f767161c000, 4471680)         = 0
munmap(0x7f767214e000, 2109648)         = 0
munmap(0x7f7672352000, 2131256)         = 0
munmap(0x7f767255b000, 2146944)         = 0
munmap(0x7f7672768000, 2204928)         = 0
munmap(0x7f7672983000, 2373504)         = 0
munmap(0x7f76815db000, 65536)           = 0
munmap(0x7f76815a9000, 65536)           = 0
munmap(0x7f7681599000, 65536)           = 0
munmap(0x7f7681579000, 65536)           = 0
munmap(0x7f7681589000, 65536)           = 0
munmap(0x7f7681569000, 65536)           = 0
munmap(0x7f7681559000, 65536)           = 0
munmap(0x7f768161b000, 65536)           = 0
brk(0x5601e10d7000)                     = 0x5601e10d7000
munmap(0x7f7672bc7000, 2328248)         = 0
munmap(0x7f7666200000, 2097152)         = 0
munmap(0x7f7666600000, 2097152)         = 0
munmap(0x7f7666000000, 2097152)         = 0
munmap(0x7f7672e00000, 2097152)         = 0
munmap(0x7f7681640000, 8192)            = 0
munmap(0x7f768163a000, 8192)            = 0
munmap(0x7f768163e000, 8192)            = 0
munmap(0x7f768163c000, 8192)            = 0
munmap(0x7f768162f000, 8192)            = 0
munmap(0x7f7681631000, 8192)            = 0
munmap(0x7f768162d000, 8192)            = 0
munmap(0x7f768162b000, 8192)            = 0
munmap(0x7f7681633000, 8192)            = 0
munmap(0x7f76815d9000, 8192)            = 0
munmap(0x7f76815d7000, 8192)            = 0
munmap(0x7f7681635000, 20480)           = 0
close(8)                                = 0
close(5)                                = 0
exit_group(0)                           = ?
+++ exited with 0 +++

In diesem Moment lief ein einziger Apache Prozess gerade auf 99% und das, ohne wieder von alleine runter zu gehen. Ich musste Apache wieder Zwangstoppen.

Außderdem habe ich aus dem Apache Error Log die Restarts mal herausgefiltert und überig blieb das:

[Fri Feb 17 14:05:14.354167 2017] [core:notice] [pid 5422] AH00094: Command line: '/usr/sbin/apache2'
[Fri Feb 17 15:14:49.712250 2017] [core:warn] [pid 5422] AH00045: child process 27797 still did not exit, sending a SIGTERM
[Fri Feb 17 15:14:51.714246 2017] [core:warn] [pid 5422] AH00045: child process 27797 still did not exit, sending a SIGTERM
[Fri Feb 17 15:14:53.716250 2017] [core:warn] [pid 5422] AH00045: child process 27797 still did not exit, sending a SIGTERM
[Fri Feb 17 15:14:55.718241 2017] [core:error] [pid 5422] AH00046: child process 27797 still did not exit, sending a SIGKILL
[Fri Feb 17 17:46:56.539338 2017] [core:notice] [pid 27926] AH00094: Command line: '/usr/sbin/apache2'
postdrop: warning: unable to look up public/pickup: No such file or directory
libpng warning: Ignoring bad adaptive filter type
libpng warning: Ignoring bad adaptive filter type
libpng warning: Ignoring bad adaptive filter type
libpng warning: Ignoring bad adaptive filter type
libpng warning: Ignoring bad adaptive filter type

Dem Access Log meiner Testseite konnte ich nur meine IP entnehmen. Das heißt diese hat die letzten 24 außer dem Google Bot keiner besucht. Alle Seiten die auf dem Server laufen haben zusammen am Tag etwa 400 Clients und etwa 950 Seitenaufrufe. Der Server ist relativ schwach ausgestattet. Es handelt sich um einen vServer von DomainFactory mit einem oder zwei kernen und 2 GB Ram. Der Speicher war aber noch nie voller als 50% und die Auslastung des Apache Prozesses ist auch unabhängig von der Tageszeit, also auch wenn niemand auf der Seite ist geht er schlagartig hoch und kommt nicht mehr runter. Ich beobachte die Prozesse von Apache schon tagelang während meiner eigentlichen Arbeit um irgendwie ein Muster zu erkennen.

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17529

Wie lange dauert so ein Request auf eine deiner Seiten ca.? Am besten mal mit wget oder curl messen. Verwunderlich ist auch das sich da einige Apache Kind Prozesse nicht saubern beenden lassen.

mfg Stefan

KSCNeon

(Themenstarter)

Anmeldungsdatum:
14. Februar 2017

Beiträge: 9

Der Apache Benchmarks sagt folgendes:

Server Software:        Apache/2.4.18
Server Hostname:        cloudload.eu
Server Port:            80

Document Path:          /
Document Length:        283 bytes

Concurrency Level:      10
Time taken for tests:   4.892 seconds
Complete requests:      10000
Failed requests:        0
Non-2xx responses:      10000
Total transferred:      4920000 bytes
HTML transferred:       2830000 bytes
Requests per second:    2044.25 [#/sec] (mean)
Time per request:       4.892 [ms] (mean)
Time per request:       0.489 [ms] (mean, across all concurrent requests)
Transfer rate:          982.20 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       1
Processing:     0    5   1.6      5      51
Waiting:        0    2   1.4      1      39
Total:          0    5   1.6      5      51

Percentage of the requests served within a certain time (ms)
  50%      5
  66%      5
  75%      6
  80%      6
  90%      7
  95%      8
  98%      9
  99%     10
 100%     51 (longest request)

cloudload.eu ist die Testseite. Im Moment läuft da nichts außer Wordpress drauf. Ich habe festgestellt, dass nach dem Benchmark Apache wieder auf 100% lief und die Seite sehr lange ladezeiten hat. nach dem Restart war wieder alles top!

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17529

Was sagt das Logfile wenn es wieder nicht geht? Sind in der access.log dann nur Requests von dir mit dem Test, oder auch andere Sachen drin? Beachte auch das ein Test mit ab hier relativ sinnlos ist, denn der Start der Domain ist erstmal ein 302er (Redirect) auf was anderes. Hintergrund ist das ab keinen Weiterleitungen folgt. Bei mir sieht das ganze dann so aus:

[stefan:~] 22 $ ab -n 1000 -c 10 https://cloudload.eu/
This is ApacheBench, Version 2.3 <$Revision: 1757674 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking cloudload.eu (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        Apache/2.4.18
Server Hostname:        cloudload.eu
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
TLS Server Name:        cloudload.eu

Document Path:          /
Document Length:        102084 bytes

Concurrency Level:      10
Time taken for tests:   216.729 seconds
Complete requests:      1000
Failed requests:        0
Total transferred:      102365000 bytes
HTML transferred:       102084000 bytes
Requests per second:    4.61 [#/sec] (mean)
Time per request:       2167.291 [ms] (mean)
Time per request:       216.729 [ms] (mean, across all concurrent requests)
Transfer rate:          461.25 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       87  114  54.2    111    1691
Processing:   812 2051 131.0   2040    2611
Waiting:      300 1022 101.1   1008    1687
Total:        903 2165 152.4   2153    4301

Percentage of the requests served within a certain time (ms)
  50%   2153
  66%   2187
  75%   2217
  80%   2239
  90%   2310
  95%   2377
  98%   2457
  99%   2527
 100%   4301 (longest request)

Wie sieht die Apache Konfiguration von dem Virtual Host aus? Laufen andere Virtual Hosts auf dem gleichen Server schneller? Welche Werte wurden für das verwendete MPM (wohl prefork) verwendet? Irgendwelche Besonderheiten am PHP eingestellt?

mfg Stefan

KSCNeon

(Themenstarter)

Anmeldungsdatum:
14. Februar 2017

Beiträge: 9

Der Access Log ist normal. Die Benchmarks sind verzeichnet und eben die normalen Zugriffe auf die Seite. Außerdem hat sich im Error Log sehr wenig getan.

[Sat Feb 18 12:52:12.941237 2017] [core:notice] [pid 21319] AH00094: Command line: '/usr/sbin/apache2'

Mehr steht nicht drin. Es sei dazu gesagt, das Apache heute die längste Zeit keinen Ärger macht und ich Apache heute kein einziges mal neu gestartet habe und das trotz deines Benchmarks.

Hier nochmal die vhost:

<VirtualHost *:80>
ServerAdmin webmaster@cloudload.eu
DocumentRoot /var/www/cloudload/
ServerName cloudload.eu
DirectoryIndex index.php
ErrorLog /var/log/apache2/cloudload-error.log
<Location />
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R]
</Location>
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@cloudlad.eu
DocumentRoot /var/www/cloudload/
ServerName cloudload.eu
ServerAlias cloudload.eu
DirectoryIndex index.php
ErrorLog /var/log/apache2/cloudload-error.log
CustomLog /var/log/apache2/cloudload-access.log combined
GnuTLSEnable on
GnuTLSPriorities SECURE128:+SECURE192:+SECURE256:-VERS-TLS-ALL:+VERS-TLS1.2:-ARCFOUR-128:-SHA1:-RSA:%SERVER_PRECEDENCE
GnuTLSCertificateFile /etc/ssl/www.cloudload.eu/certificate.crt 
GnuTLSKeyFile /etc/ssl/www.cloudload.eu/private.key 
<Directory /var/www/cloudload/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

In der PHP ini habe ich nur Wordpress relevantes geändert, aber auch erst gestern Abend. Die Änderungen: PHP Time Limit: 300 PHP Max Input Vars: 1680

Es sei nochmal erwähnt, dass ich Ajenti laufen habe. Einmal wegen der schönen Dateiverwaltung über den Browser und zweitens um auch auf Grund des Fehler am Handy die CPU und Speicherauslastung zu beobachten. Am MPM ist absolut nichts verändert worden. Hier nochmal ein Auszug der Apache Dienste:

Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 gnutls_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 php7_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 status_module (shared)

Vielen lieben Dank für die Hilfe bei meinem Problem ☺

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17529

Dann sollten wir schauen das wir einen Zusammenhang finden, auf den ersten Blick sieht deine Konfiguration OK aus.

mfg Stefan
PS: Eventuell solltest du AllowOverride deaktivieren, das kostet nämlich auch Performance pro Request.

KSCNeon

(Themenstarter)

Anmeldungsdatum:
14. Februar 2017

Beiträge: 9

Also was mir auffällt, wenn Apache dann wieder streikt gibt es teils einen oder mehrere Prozesse, die immer exakt den selben Speicher und die selbe CPU Auslastung verursachen. Das heißt zum Beispiel 3 Prozesse die jeweils 33% CPU benötigen oder eben zwei Prozesse á 50% usw. Könnte es denn allgemein sein, das der Server für mehrere Wordpress Installationen einfach zu schwach ist. Er hat ja nur einen Kern und 2GB Ram. Aber auf der anderen Seite muss der Prozess auch bei einem schwachen CPU irgendwann nachlassen weil laut Domainfachtory ist die durchschnittliche CPU Auslastung abgesehen von den Ausrastern seitens Apache beinahe bei null.

Zur Veranschaulichung die Auslastung im DF Kundenmenü im Anhang!

Bilder

KSCNeon

(Themenstarter)

Anmeldungsdatum:
14. Februar 2017

Beiträge: 9

Eben musste ich etwas erschreckendes feststellen. Ich saß die ganze Nacht dran und habe den Server neu aufgesetzt. Soeben habe ich die erste Seite aktiviert und da ist der Fehler wieder. Exakt das gleiche Phänomen und dieses mal ist wirklich noch keine Änderung vorgenommen worden außer die Installation von GnuTLS.

Vielleicht hängt der Fehler bei GnuTLS. Um das mal auszuschließen würde ich gerne mod_ssl verwenden. Leider ist mir nicht bekannt wie ich mit mod_ssl mehrere vhosts mit unterschiedlichen SSL Zertifikaten bediene. Hat hierfür eventuell jemand einen Tipp für mich?

Liebe Grüße Jonathan

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17529

Ob es an der SSL Implementierung liegt kannst du sehr zuverlässig testen indem du es ohne SSL probierst. Aber auch diverse Wordpress Plugins können komische Effekte haben, denn bei Apache mit mod_php siehst du von außen nicht ob PHP oder Apache selbst dein Problem ist. Um das zu isolieren kann man z.B. php-fpm benutzen.

Zu SNI, also dem pro VHost ein anderes Zertifikat, gibt es im Apache Wiki auch eine Dokumentation. Beachte aber vor allem auch welche Virtual Hosts aktiv sind, nicht das du deswegen mit mod_ssl in ein Problem rennst.

Mit dem Befehl openssl x509 -in deincert.crt -noout -text kann man die wesentlich Header Informationen eines Zertifikates anzeigen. Eventuell magst du das für deine Certs in deinen nächsten Post mit einbauen.

mfg Stefan

KSCNeon

(Themenstarter)

Anmeldungsdatum:
14. Februar 2017

Beiträge: 9

Also, wie es aussieht lag es am SSL. Es gab zwar seitens GnuTLS keine Fehlermeldungen, aber seit GnuTLS deaktiviert ist läuft der Server perfekt und zuverlässig! Danke für den SNI Tipp! Habe ich soeben umgesetzt. Habe ich es richtig verstanden, dass ich den vhosts bzw. der apache.conf nur die Zeile

SSLStrictSNIVHostCheck off

hinzufügen muss? Laut SSL Labs hakt nähmlich immer noch was siehe:https://www.ssllabs.com/ssltest/analyze.html?d=spacetarif.de SSL Labs sagt:

Chain issues 	Contains anchor
Certificate #2: RSA 2048 bits (SHA256withRSA) No SNI

Den Contains anchor fehler habe ich ausschließlich mit Zertifikaten von Domainfactory laut einigen Foren ist der aber nicht schlimm, Aber mit anderen Zertifikaten von z.B. StartSSL etc. habe ich das nicht. Danke für eure Hilfe, habe einige erfahrungen mit Linux Server sammeln können 😛

encbladexp Team-Icon

Ehemaliger
Avatar von encbladexp

Anmeldungsdatum:
16. Februar 2007

Beiträge: 17529

Contains Anchor bedeutet das du das Root Certificate der CA mit auslieferst. Das solltest du nicht machen, dann wäre auch der Fehler weg. Wenn du SNI Erzwingen willst, was 2017 wirklich Standard ist, dann solltest du die Variable auf on setzen.

mfg Stefan

Antworten |