Cannot fork: Cannot allocate memory | BlockingInformParent

Begonnen von Burny4600, 14 Februar 2018, 10:33:06

Vorheriges Thema - Nächstes Thema

Hardlife

Muss nicht sein...

Ich habe Perl 5.20.2 und 5.20.3 probiert und trotzdem tritt das Leck auf :-(

Bin momentan auf Raspbian Jessie unterwegs...

Tja...
Raspi 4B
nanoCUL-868 & 433,JeeLink,milight,Signalduino,GPIO-433er-Sender/Empfänger, GPIO-Infrarot,GSM-Stick für SMS
MAX!-Heizungssteuerung,Intertechno-V1-Steckdosen + V3-Dimmer,"Flamingo FA21RF"-Funk-Rauchmelder
433er-China-Bewegungsmelder,"Voltcraft CO20"-Stick,LaCrosse-Temperatur,Revolt-NC5462

Nighthawk

Wie man auf 5.20.3 wechselt ist unter Anderem im Post #379 sehr detailiert beschrieben.

Timo_FHEM

Hallo zusammen,

ich habe das Problem auch sporadisch. Ich bekomme bevor der Fehler "Cannot fork" auftritt im Log immer diese Einträge:


2019.03.26 00:00:33 1: [YAAHM_updater] on device Status called for this day
2019.03.26 03:53:06 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 03:59:06 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 03:59:06 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:01:06 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:03:06 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:04:06 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:06:07 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:06:07 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:12:07 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:13:07 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:14:07 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:14:07 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:15:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:15:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:16:07 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 04:16:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:16:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:17:07 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 04:17:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:17:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:18:07 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3516.
2019.03.26 04:18:07 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 04:18:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:18:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:19:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:19:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:21:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:21:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:22:08 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:23:07 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:24:08 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:24:08 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:26:08 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:27:07 1: PERL WARNING: Use of uninitialized value $val in int at ./FHEM/42_SYSMON.pm line 1765.
2019.03.26 04:27:07 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3516.
2019.03.26 04:27:07 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 04:27:07 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:27:07 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:28:08 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:30:08 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:30:08 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:32:08 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:33:08 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:33:08 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:36:08 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:37:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:40:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:42:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:43:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:44:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:45:09 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:45:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:48:08 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3516.
2019.03.26 04:48:08 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 04:48:08 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:48:08 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:49:09 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 04:49:09 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 04:49:09 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 04:51:09 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:51:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:52:09 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:52:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 04:53:09 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3635.
2019.03.26 04:53:09 1: PERL WARNING: Use of uninitialized value in string eq at ./FHEM/42_SYSMON.pm line 2867.
2019.03.26 05:01:10 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 05:01:10 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 05:01:10 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 05:02:10 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 05:02:10 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 05:02:10 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 05:03:09 1: PERL WARNING: Use of uninitialized value $val in int at ./FHEM/42_SYSMON.pm line 1765.
2019.03.26 05:03:10 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3516.
2019.03.26 05:03:10 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 05:03:10 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.
2019.03.26 05:04:10 1: PERL WARNING: Use of uninitialized value $val in int at ./FHEM/42_SYSMON.pm line 1765.
2019.03.26 05:04:10 1: PERL WARNING: Use of uninitialized value in int at ./FHEM/42_SYSMON.pm line 3516.
2019.03.26 05:04:10 1: PERL WARNING: Use of uninitialized value $entry in index at ./FHEM/42_SYSMON.pm line 2186.
2019.03.26 05:04:10 1: PERL WARNING: Use of uninitialized value $free_version in substitution (s///) at ./FHEM/42_SYSMON.pm line 2268.
2019.03.26 05:04:10 1: PERL WARNING: Use of uninitialized value $free_version in numeric gt (>) at ./FHEM/42_SYSMON.pm line 2269.


Die nächste Meldung ist dann Cannot fork: Cannot allocate memory:

2019.03.26 05:04:10 1: Cannot fork: Cannot allocate memory
2019.03.26 05:04:10 1: Cannot fork: Cannot allocate memory
2019.03.26 05:04:10 1: in CANNOT_FORK
2019.03.26 05:04:10 1: in CANNOT_FORK
2019.03.26 05:04:10 1: Server shutdown delayed due to alexa for max 10 sec
2019.03.26 05:04:13 1: in SHUTDOWN
2019.03.26 05:04:13 1: in SHUTDOWN
2019.03.26 05:04:13 0: Server shutdown
2019.03.26 05:04:16 1: PERL WARNING: "my" variable $sleepId masks earlier declaration in same scope at ./FHEM/99_myUtils.pm line 114.
2019.03.26 05:04:16 1: Including fhem.cfg
2019.03.26 05:04:27 1: [Alarm_Define] data hash restored from save file with date 2018-12-14 21:20:12
2019.03.26 05:04:32 1: PERL WARNING: Subroutine YAAHM_restore redefined at ./FHEM/95_YAAHM.pm line 980, <$fh> line 957.
2019.03.26 05:04:32 1: PERL WARNING: Subroutine YAAHM_setWeeklyTime redefined at ./FHEM/95_YAAHM.pm line 1813, <$fh> line 957.
2019.03.26 05:04:32 1: [YAAHM_Define] data hash restored from save file with date 2019-02-15 19:36:01
2019.03.26 05:04:32 1: [YAAHM] does not find an Astro device, loading module Astro separately
2019.03.26 05:04:33 1: Including ./log/fhem.save
2019.03.26 05:04:35 1: in INITIALIZED
2019.03.26 05:04:35 1: in INITIALIZED
2019.03.26 05:04:36 1: usb create starting
2019.03.26 05:04:37 1: usb create end
2019.03.26 05:04:37 0: Featurelevel: 5.9
2019.03.26 05:04:37 0: Server started with 134 defined entities (fhem.pl:18343/2019-01-20 perl:5.024001 os:linux user:fhem pid:19813)
2019.03.26 05:04:38 1: in DEFINED
2019.03.26 05:04:38 1: in DEFINED
2019.03.26 05:04:38 1: in ATTR
2019.03.26 05:04:38 1: in ATTR
2019.03.26 05:04:39 1: in MODIFIED
2019.03.26 05:04:39 1: in MODIFIED
2019.03.26 05:04:39 1: in MODIFIED
2019.03.26 05:04:39 1: in MODIFIED
2019.03.26 05:04:53 1: PERL WARNING: Odd number of elements in hash assignment at ./FHEM/98_Modbus.pm line 4861.
2019.03.26 05:04:53 1: [YAAHM_updater] on device Status called for this day
2019.03.26 05:04:53 1: PERL WARNING: Use of uninitialized value in string comparison (cmp) at ./FHEM/95_YAAHM.pm line 269.
2019.03.26 05:04:53 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/95_YAAHM.pm line 1837.
2019.03.26 05:04:53 1: PERL WARNING: Use of uninitialized value in concatenation (.) or string at ./FHEM/95_YAAHM.pm line 1857.
2019.03.26 05:10:00 1: PERL WARNING: Use of uninitialized value $mval in substitution (s///) at ./FHEM/95_YAAHM.pm line 1140.
2019.03.26 05:10:00 1: PERL WARNING: Use of uninitialized value $nval in substitution (s///) at ./FHEM/95_YAAHM.pm line 1141.
2019.03.26 05:10:00 1: PERL WARNING: Use of uninitialized value $tval in substitution (s///) at ./FHEM/95_YAAHM.pm line 1142.
2019.03.26 05:10:00 1: PERL WARNING: Use of uninitialized value $mval in numeric ge (>=) at ./FHEM/95_YAAHM.pm line 1145.
2019.03.26 05:10:00 1: PERL WARNING: Use of uninitialized value $nval in numeric gt (>) at ./FHEM/95_YAAHM.pm line 1145.
2019.03.26 05:10:01 1: PERL WARNING: Use of uninitialized value $xval in concatenation (.) or string at ./FHEM/95_YAAHM.pm line 1267.
2019.03.26 05:10:01 1: PERL WARNING: Use of uninitialized value $xval in concatenation (.) or string at ./FHEM/95_YAAHM.pm line 1269.
2019.03.26 05:10:01 1: [YAAHM_time] executing
2019.03.26 05:10:01 1: PERL WARNING: Use of uninitialized value $cmd in pattern match (m//) at fhem.pl line 1051.


Kann jemand damit was anfangen?
Kann das ein Problem im Modul 42_SYSMON sein?

Ein Bild des Plots hab ich angehängt.

Danke und Gruß
Timo

Wondermusic

Das muss nicht unbedingt sein... Bei mir läuft es ohne Probleme.
Aber ich hatte vor einigen Tagen eine ähnliche Meldung in der auch sysmon in ähnlicher Weise vorgekommen ist (zu dem Zeitpunkt musste ich FHEM 2 mal am Tag neustarten).

Aber an einem anderen Punkt hier in der Diskussion wurde gesagt, ein Modul nach dem anderen mal rauszunehmen.
Glücklicherweise brauchte ich nicht lange suchen, denn ich hatte vor einigen Tagen hier einen Threat bzgl. eines ewig andauernen Freeze bei fhem aufgemacht. Nachdem ich zu diesem Zwecke Freezemon aktiviert hatte konnte ich den Fehler ausmachen der zu den freezes geführt hat. Freezemon hatte ich danach deaktiviert.
Aber ca. zu diesem Zeitpunkt fingen die "Cannot Fork"- Probleme an - also ständig anwachsender RAM- verbrauch. Daher habe ich das Modul aus dem fhem Verzeichnis genommen und unter contrib abgelegt.
Seitdem läuft der RPi3 mit konstant 13% +/- 1% Speicherbelastung durch.

Gruß,
Richy
RPi 3B+ FHEM-Server mit HM-MOD-RPI-PCB
RPi2 mit HM-MOD-RPI-PCB
HM-CFG-LAN
RPi 4 mit ioBroker
>100 HM Sensoren & Aktoren, div. ESP8266 via mqtt, ems-esp

Skusi

Schade, ich habe  voller Hoffnung das Freezemon auch aus dem Fhem Ordner in den contrip Ordner  verschoben. Leider steigt mein Ram immer noch genauso an.
Ich bin echt ratlos. Ich hab schon ein frisches Fhem auf einem frischen rasperry 3 den ich hier noch hatte aufgesetzt. Leider startet dieses Fhem nicht durch wenn ich meine fehm.cfg einfüge. Wie könnte ich den nun einkreisen welches Modul der Täter ist. Wobei ich doch schon gelesen habe dass es sich nicht mal um nur ein Modul handeln könnte. Den Fehler findet man doch nie.
Mich ärgert es masslos das alles jahrelang gut lief, und nun plötzlich das System kaum noch zu gebrauchen ist. Ich kann doch nicht alles von vorne neu programmieren.
RPI3B, SIGNALduino, NanoCul868 (a-culfw), JeeLink Clone (LaCrosse), Firmata  für FB Heizung,Wasser+Gas+Klingel+Lux, Somfy Rolladen, Pollin Steckd.,TX29DTH,ESPEasy an S0 Stromz., MAX Fensterkontakte, IButton, SonOff Tasmota, ESP LED Controler

rudolfkoenig

ZitatWobei ich doch schon gelesen habe dass es sich nicht mal um nur ein Modul handeln könnte. Den Fehler findet man doch nie.
Sicher doch: ein Modul nach dem anderen abschalten, und Verbrauch jeweils vorher/nachher protokollieren.
Verwendest du perl 5.24? Wenn ja, bitte eine andere Version (vorzugsweise 5.20, da getestet) einsetzen, da 5.24 bekanntermassen ein Speicherloch hat.
Ich habe auch RPi Bibliotheken in Verdacht: womoeglich laesst sich diese Theorie belegen, indem man den Speicherverbraucht auf einem x86 PC prueft.

ZitatMich ärgert es masslos das alles jahrelang gut lief, und nun plötzlich das System kaum noch zu gebrauchen ist. Ich kann doch nicht alles von vorne neu programmieren.
Ich kann dein Aerger nachvollziehen, allerdings koennen wir (Entwickler) daran mangels neuer Ideen oder genauere Infos (wo es auftritt) nicht weiterhelfen.

Damian

#456
Zitat von: rudolfkoenig am 07 April 2019, 09:23:45
Sicher doch: ein Modul nach dem anderen abschalten, und Verbrauch jeweils vorher/nachher protokollieren.
Verwendest du perl 5.24? Wenn ja, bitte eine andere Version (vorzugsweise 5.20, da getestet) einsetzen, da 5.24 bekanntermassen ein Speicherloch hat.
Ich habe auch RPi Bibliotheken in Verdacht: womoeglich laesst sich diese Theorie belegen, indem man den Speicherverbraucht auf einem x86 PC prueft.
Ich kann dein Aerger nachvollziehen, allerdings koennen wir (Entwickler) daran mangels neuer Ideen oder genauere Infos (wo es auftritt) nicht weiterhelfen.

Selbst auf einem X86 PC unter Windows ist der Bug mit Ver. 5.24 (Active Perl) reproduzierbar.

Ich konnte es mit der alten DOIF-Version jederzeit nachstellen. Die neue DOIF-Version umgeht bestimmte Regex-Abfragen, die zum Speicherverbrauch führten. Damit ist das Speicherproblem in Kombination mit DOIF mit der Version 5.24 weitgehend ausgemerzt.

Zu anderen Modulen kann ich natürlich keine Aussage machen.

Auf jeden Fall ist die Version 5.24 zu meiden, leider ist das die aktuelle Version beim Raspi.
Programmierte FHEM-Module: DOIF-FHEM, DOIF-Perl, DOIF-uiTable, THRESHOLD, FHEM-Befehl: IF

der-Lolo

Und leider ist 5.24 auch die aktuelle Version von ActivePerl auf dem Synology NAS - Die auslagerung die FHEM hier bei mir in den Arbeitsspeicher legt wird problemlos bis zu 4GB groß - ab da wird FHEM träge, ich merke das am Webinterface...
Nach einem FHEM neustart ist dann alles wieder schick - für die nächsten 5 Tage...

Skusi

Ok, ich würde mich dann mal an die Arbeit machen. Glücklicherweise läuft mein Live System noch auf Perl 5.20.2.  Aber wie kann ich nun in meinem Live System ein Modul nach dem anderen ausschalten ohne das gleich alles zusammenbricht? Soll ich eine Moduldatei nach der anderen aus dem Fhem Verzeichnis nehmen und dann die Fehlermeldungen im Log ignorieren und die Funktionsstörungen ?

Oder meint Ihr mit abschalten eine define nach der anderen auf disable zu setzten.
RPI3B, SIGNALduino, NanoCul868 (a-culfw), JeeLink Clone (LaCrosse), Firmata  für FB Heizung,Wasser+Gas+Klingel+Lux, Somfy Rolladen, Pollin Steckd.,TX29DTH,ESPEasy an S0 Stromz., MAX Fensterkontakte, IButton, SonOff Tasmota, ESP LED Controler

rudolfkoenig

Das Attribut disable  (wenn es ueberhaupt implementiert ist) arbeitet bei jedem Modul anders.
Ich wuerde die defines entfernen, aber Moduldatei entfernen (und Fehlermeldungen ignorieren) geht auch.
Wichtig: Methodisch vorgehen, bei jedem Versuch notieren, was entfern wurde und Verbrauch aufzeichnen.
Und vorher natuerlich alles sichern.

Wernieman

Wobei beiu solchen radikalen Ansätzen ich empfehlen würde, mal im ausgeschalteten Zustand (FHEM) den Ordner /opt/fhem zu kopieren. So ist ein "wieder anfahren" einfacher möglich.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

MadMax-FHEM

#461
Ohne jetzt einem bestimmten Modul "Schuld" geben zu wollen aber ich fahre grad den Ansatz:

Test-System (wild installiert und eine Spielwiese für alles): ja klar Speicheranstieg. Es läuft so gut 1-2 Wochen bevor es dann eng wird

Pre-Aktiv-System (sauber installiert und hier "wandern" erst mal die Module vom Test-System die ich für das Aktiv-System gerne haben würde): Speicheranstieg erst seit echodevice Modul. Nicht schlimm (läuft ja wenig in Summe) aber deutlich erkennbar.

Aktiv-System: leider auch hier Speicheranstieg. Läuft aber problemlos 1 Monat und länger. Meistens habe ich da dann etwas optimiert und starte eh mal durch. Kann also damit leben und fange dort jetzt nicht mit dem Deaktivieren einzelner Module an, um das (weiter) zu entspannen. Hier fahre ich eher die Strategie: keine Module aufzunehmen, die auf dem Pre-Aktiv-System "Probleme" gezeigt haben...



Also auf dem Test-System wird alles was ich so finde mal ausprobiert und getestet.
Installations-Schwierigkeiten werden dort auch versucht "auszumerzen"...
...und notiert wie eine saubere Installation funktionieren sollte/müsste.
Wenn ich dann denke, dass ich das im Aktiv-System haben will, wird es auf das Pre-Aktiv-System eingespielt.
Hier wird dann getestet, ob die notierte Installation wirklich so geht ;)

Sorry, ich schweife ab...

Hierbei bin ich grad am Umziehen von alexa-fhem und dem echodevice...

alexa-fhem lief einige Monate ohne Auffälligkeiten bzgl. Speicher auf dem Pre-Aktiv-System.
Seit dem Umzug des echodevice-Moduls (vor so 2-3 Wochen) ging dann der Speicheranstieg auf meinem Pre-Aktiv-System los.
Neben dem echodevice Modul (mit so ca. 10+ Devices) habe ich noch weblink (current Artist etc.) "aktiviert".
Werde mal testen ob das echodevice oder weblink (oder eines der anderen "neuen" Module/Dinge) die "Probleme" verursacht...
...ist ja grad erst in die "Pre-Aktiv-Phase" gegangen ;)


Alles PI3 mit in etwa gleich aktuellem Stretch lite (letzte Aktualisierung zw. 6 und 2 Monaten) und perl 5.24.1

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

canis

Hi,
Seit einem Update Ende März hatte ich auch das Problem.
Nach vielen Versuchen, alle möglichen Module zu deaktiviren, auch mySQL auszulagern, hat sich das Problem (zumindest bei mir) nach dem Lesen dieses Threads wie folgt lösen lassen:
- Das zuvor mit disable 1 gekennzeichnete freezmon aus der Konfiguration endgültig gelöscht
- Dar Modul 98_freezemon.pm von ./FHEM nach ./contrib verschoben
- attr global exclude_from_update 98_freezemon.pm ./FHEM/98_freezemon.pm zum ausschliessen der Rückspeicherung in fhem.cfg eingefügt
FHEM läuft nun ohne den Speicher zuzumüllen und ohne Swap zu benutzen mit ca. 337.79 MB Speicherbedarf,
allerdings (noch) mit externem mySQL.
P.S.: Nun wieder mit eigenem mySQL ohne Speicherprobleme, Speichernutzung konstant ca. 510 MB
Lerneffekt:
"attr xxx disable 1" deaktiviert das bezogene Modul nicht wirklich.
98_freezemon.pm ist wohl etwas buggy

yamaha1983

Noch ein kleiner Hinweis für alle perlbrew Nutzer, die auf Version perl-5.20.3 wechseln.

Solltet ihr immer noch memory leaks feststellen, dann bitte prüft nochmal, ob FHEM auch das richtige Perl nutzt.
Einfach in die Kommandozeile von fhem folgendes eingeben:

{`perl -v`}

Hier sollte dann folgende Meldung kommen

---
This is perl 5, version 20, subversion 3 (v5.20.3) built for armv7l-linux
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
---

Ansonsten ist euer FHEM Startskript nicht ok.

Grüße,
yamaha1983

Brice

#464
Seit 03/2018 konnte ich dem Ausstieg von FHEM bedingt durch schleichenden RAM-Anstieg erfolgreich begegnen. Am 07.03.2019 und heute hatte ich ein neues Problem: der RAM-Verbrauch ist heute morgen um 06:08 innerhalb einer Minute von 250 auf 751 MB angestiegen, das Notify zum Neustart von FHEM triggert den shutdown / restart, aber es wird kein Arbeitsspeicher freigegeben. Selbst ein shutdown des RPi 3 mit anschließendem Neustart gibt den Arbeitsspeicher nicht mehr frei und FHEM wird permanent aufgrund des Notify neu gestartet.
2019-04-11_13:51:41 sysmon ram_used: 757.18
2019-04-11_13:50:30 sysmon ram_used: 757.18
2019-04-11_06:36:33 sysmon ram_used: 757.18
2019-04-11_06:35:17 sysmon ram_used: 757.18
2019-04-11_06:34:01 sysmon ram_used: 757.18
2019-04-11_06:32:45 sysmon ram_used: 757.18
2019-04-11_06:31:30 sysmon ram_used: 757.18
2019-04-11_06:27:28 sysmon ram_used: 757.18
2019-04-11_06:26:13 sysmon ram_used: 757.18
2019-04-11_06:24:57 sysmon ram_used: 757.18
2019-04-11_06:23:40 sysmon ram_used: 757.18
2019-04-11_06:18:38 sysmon ram_used: 757.18
2019-04-11_06:17:22 sysmon ram_used: 757.18
2019-04-11_06:16:07 sysmon ram_used: 757.18
2019-04-11_06:14:50 sysmon ram_used: 757.18
2019-04-11_06:13:33 sysmon ram_used: 757.18
2019-04-11_06:12:18 sysmon ram_used: 757.18
2019-04-11_06:10:59 sysmon ram_used: 757.18
2019-04-11_06:09:43 sysmon ram_used: 757.18
2019-04-11_06:08:26 sysmon ram_used: 757.18
2019-04-11_06:08:23 sysmon ram_used: 245.92
2019-04-11_06:07:21 sysmon ram_used: 245.92
2019-04-11_06:07:20 sysmon ram_used: 257.37
2019-04-11_06:06:18 sysmon ram_used: 257.37


Logfile (verbose 3) gibt noch nicht einmal "cannot fork ...". Im März 2019 hat erst das Beschreiben der SD-Karte mit einem gesicherten Image das Problem gelöst.
2019.04.11 06:08:32 1: Including fhem.cfg
2019.04.11 06:08:31 1: PERL WARNING: Subroutine getEmoji redefined at ./FHEM/99_myUtilsBlitzerSF.pm line 326.
2019.04.11 06:08:31 1: PERL WARNING: Subroutine getInfoBlitzer redefined at ./FHEM/99_myUtilsBlitzerSF.pm line 211.
2019.04.11 06:08:31 1: PERL WARNING: Subroutine checkHTTPMODBlitzer redefined at ./FHEM/99_myUtilsBlitzerSF.pm line 123.
2019.04.11 06:08:31 1: PERL WARNING: Subroutine getBlitzer redefined at ./FHEM/99_myUtilsBlitzerSF.pm line 27.
2019.04.11 06:08:31 1: PERL WARNING: Subroutine myUtilsBlitzer_Initialize redefined at ./FHEM/99_myUtilsBlitzerSF.pm line 15.
2019.04.11 06:08:28 0: Server shutdown
2019.04.11 06:08:28 1: sendEmail returned: Reading message body from STDIN because the '-m' option was not used.If you are manually typing in a message:  - First line must be received within 60 seconds.  - End manual input with a CTRL-D on its own line.Apr 11 06:08:27 fhemprod_rpi3 sendEmail[564]: Message input complete.Apr 11 06:08:28 fhemprod_rpi3 sendEmail[564]: Email was sent successfully!
2019.04.11 06:08:26 1: sendEmail Text:
2019.04.11 06:08:26 1: sendEmail Subject: RPi3 Produktiv wurde vom System neu gestartet
2019.04.11 06:08:26 1: sendEmail RCP: xxx@xxx.de
2019.04.11 06:04:47 3: Watchdog watchdog_Bad_ZW_off triggered

FHEM up time            : 7 days, 13 hours, 01 minutes
System up time          : 7 days, 13 hours, 02 minutes
2019.04.11 06:00:01 1: Date                    : 11.04.2019 06:00:01
2019.04.11 05:59:44 3: Watchdog watchdog_Abstell_aus triggered


free ergibt:

pi@FHEMProd_RPi3:~ $ free
              total        used        free      shared  buff/cache   available
Mem:         949448       75576      669864       18244      204008      803688
Swap:        102396           0      102396
pi@FHEMProd_RPi3:~ $ free
              total        used        free      shared  buff/cache   available
Mem:         949448      142132      600524       18244      206792      737092
Swap:        102396           0      102396
pi@FHEMProd_RPi3:~ $ free
              total        used        free      shared  buff/cache   available
Mem:         949448      130896      611504       18244      207048      748316
Swap:        102396           0      102396
pi@FHEMProd_RPi3:~ $


Perl-Version ist 5.24.1

Hat jemand schon einmal ein ähnliches Problem gehabt und hätte einen Lösungsvorschlag?

Unabhängig davon werde ich über perlbrew auf die V5.20 gehen.

Stefan

edit: Auszüge Logfiles hinzugefügt
FHEM auf RPi 4 4GB (Buster) | produktiv) CUL 868 für FS20 | S300TH | KS300 | Max!Cube als CUN 868 für TechemWZ | HM-MOD-RPI-PCB für HM | Z-Wave ZME_UZB1 | FRITZ!DECT 200 | HUE | Lightify | Echo Dot | WS3080