Oh man, das ist bitter… Am 14.4.2015 hat um 8:45 Uhr der Out Of Memory Killer zugeschlagen und zuerst den XMPP Server, dann die Datenbank und danach den Webserver abgeschossen.
1 2 3 4 |
Apr 14 08:45:23 twattle kernel: [584969.737183] Out of memory: Kill process 25418 (lua5.1) score 59 or sacrifice child Apr 14 08:45:26 twattle kernel: [584973.992560] Out of memory: Kill process 3204 (mysqld) score 19 or sacrifice child Apr 14 08:45:26 twattle kernel: [584974.074681] Out of memory: Kill process 3219 (mysqld) score 20 or sacrifice child Apr 14 08:45:28 twattle kernel: [584975.651169] Out of memory: Kill process 32092 (apache2) score 19 or sacrifice child |
Zum Glück überwache ich diese Dienste ja und bekomme eine Mail wenn etwas nicht funktioniert. Dummerweise ist das gleiche auch auf meinem Mailserver passiert. Dort wurde am Sonntag der Virenscanner vom Out Of Memory Killer abgeschossen und die Mails landeten daher in der Deferred-Queue und wurden nicht mehr zugestellt.
Also habe ich bis heute nicht mitbekommen, dass Twattle.net nicht mehr funktionierte.
Ich finde dieses over-commitment Konzept von Linux ja irgendwie merkwürdig. Der Kernel verspricht den Programmen, dass sie viel Speicher bekommen können, hofft aber, dass sie diesen niemals tatsächlich anfordern werden, weil der Rechner diesen Speicher gar nicht hat. Fordert ein Programm dann mal mehr Speicher an als noch verfügbar ist, dann kommt der Out Of Memory Killer und sucht sich ein Programm aus, welches viele Ressourcen verwendet und beendet es einfach. Der Server ist danach in einem undefinierten Zustand und wichtige Dinge funktionieren nicht mehr.
Das ist dann so ähnlich wie in dieser erfundenen Geschichte:
An aircraft company discovered that it was cheaper to fly its planes with less fuel on board. The planes would be lighter and use less fuel and money was saved. On rare occasions however the amount of fuel was insufficient, and the plane would crash. This problem was solved by the engineers of the company by the development of a special OOF (out-of-fuel) mechanism. In emergency cases a passenger was selected and thrown out of the plane. (When necessary, the procedure was repeated.) A large body of theory was developed and many publications were devoted to the problem of properly selecting the victim to be ejected. Should the victim be chosen at random? Or should one choose the heaviest person? Or the oldest? Should passengers pay in order not to be ejected, so that the victim would be the poorest on board? And if for example the heaviest person was chosen, should there be a special exception in case that was the pilot? Should first class passengers be exempted? Now that the OOF mechanism existed, it would be activated every now and then, and eject passengers even when there was no fuel shortage. The engineers are still studying precisely how this malfunction is caused.
Quelle: Andries Brouwer – lwn.net/Articles/104185/, Fri, 24 Sep 2004 01:45:20 +0200
Ich bitte vielmals um Entschuldigung. Ich werde mein Überwachungskonzept und einige Konfigurationen anpassen und hoffe, dass so etwas nicht wieder passiert.