FHEM 100% CPU Auslastung: Too many open files

Begonnen von FHEM-Wohnung, 14 Dezember 2020, 21:06:09

Vorheriges Thema - Nächstes Thema

FHEM-Wohnung

Hallo,

ich habe leider Probleme mit meiner FHEM installation.

Kurz zum System: Verwendet wird ein Intel Nuc mit Proxmox. Darauf läuft Debian 9.12.
Meine Installation verwende ich bereits seit zwei Jahren in Arbeit. Bissher ist das Problem nicht aufgetreten.
In FHEM habe ich alle updates durchgeführt. In Debian wurde apt-get update && Upgrade durchgeführt.

Mein Problem ist folgendes... ab und zu (ich habe keine Regelmäßigkeit festgestellt) hängt sich FHEM auf. Es lässt sich nicht mehr die Seite im Browser öffnen. Des Weiteren wird der CPU zu 100% ausgelastet. Das Netzwerk wird gekillt (Anscheint sendet FHEM Unmengen an Befehlen ins Netzwerk und legt es komplett lahm). Dadurch läuft die Fritzbox auf 100% und das Netzwerk bricht zusammen. Stoppe ich die FHEM installation ist schlagartig das Netzwerk wieder da. Wenn ich dann wieder FHEM Neustarte, funktioniert erstmal wieder FHEM.

Im Log steht folgendes:

2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 2: HueBridge: http request failed: Creating socket: Bad file descriptor
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 2: HueBridge: http request failed: Creating socket: Bad file descriptor
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)
2020.12.14 14:06:17 1: Accept failed (WEB: Too many open files)
2020.12.14 14:06:17 1: Accept failed (telnetForBlockingFn_1607915439: Too many open files)



Woran kann es liegen? Wie bekomme ich den Fehler gelöst :/?

Danke vielmals!

FHEM-Wohnung

#1
root@fhem:~# ps -ef | grep fhem
fhem       285     1  0 02:51 ?        01:37:47 /usr/bin/perl fhem.pl fhem.cfg
fhem       405   285  0 02:52 ?        00:00:03 node /usr/bin/alexa-fhem -c ./alexa-fhem.cfg
fhem      2988   405  0 04:16 ?        00:00:00 /usr/bin/ssh -R 1234:127.0.0.1:40837 -oServerAliveInterval=90 -i /opt/fhem/.ssh/id_rsa -p 58824 fhem-va.fhem.de
fhem     16398   285  0 10:39 ?        00:00:00 /usr/bin/perl fhem.pl fhem.cfg
fhem     16399   285  0 10:40 ?        00:00:00 /usr/bin/perl fhem.pl fhem.cfg
fhem     16400   285  0 10:40 ?        00:00:00 /usr/bin/perl fhem.pl fhem.cfg
fhem     16401   285  0 10:40 ?        00:00:00 /usr/bin/perl fhem.pl fhem.cfg
root     16419 16402  0 10:40 ?        00:00:00 grep fhem


root@fhem:~# ls /proc/285/fd
0     1016  114  133  152  171 190  209  228  247  266  285  303  322 341  360  38   399  417  436  455  474 493  511  530  55   569  588  606  625 644  663  682  700  72 739  758  777 796  814  833  852  871  890  909  928 947  966  985
1     1017  115  134  153  172 191  21   229  248  267  286  304  323 342  361  380  4    418  437  456  475 494  512  531  550  57 589  607  626 645  664  683  701  720  74   759  778 797  815  834  853  872  891  91   929 948  967  986
10    1018  116  135  154  173 192  210  23   249  268  287  305  324 343  362  381  40   419  438  457  476 495  513  532  551  570  59   608  627 646  665  684  702  721  740  76   779 798  816  835  854  873  892  910  93 949  968  987
100   1019  117  136  155  174 193  211  230  25   269  288  306  325 344  363  382  400  42 439  458  477 496  514  533  552  571  590  609  628 647  666  685  703  722  741  760  78 799  817  836  855  874  893  911  930 95   969  988
1000  102   118  137  156  175 194  212  231  250  27 289  307  326 345  364  383  401  420  44   459  478 497  515  534  553  572  591  61   629 648  667  686  704  723  742  761  780 8    818  837  856  875  894  912  931 950  97   989
1001  1020  119  138  157  176 195  213  232  251  270  29   308  327 346  365  384  402  421  440  46   479 498  516  535  554  573  592  610  63 649  668  687  705  724  743  762  781 80   819  838  857  876  895  913  932 951  970  99
1002  1021  12 139  158  177 196  214  233  252  271  290  309  328 347  366  385  403  422  441  460  48 499  517  536  555  574  593  611  630 65   669  688  706  725  744  763  782 800  82   839  858  877  896  914  933 952  971  990
1003  1022  120  14   159  178 197  215  234  253  272  291  31   329 348  367  386  404  423  442  461  480 5    518  537  556  575  594  612  631 650  67   689  707  726  745  764  783 801  820  84   859  878  897  915  934 953  972  991
1004  1023  121  140  16   179 198  216  235  254  273  292  310  33 349  368  387  405  424  443  462  481 50   519  538  557  576  595  613  632 651  670  69   708  727  746  765  784 802  821  840  86   879  898  916  935 954  973  992
1005  103   122  141  160  18 199  217  236  255  274  293  311  330 35   369  388  406  425  444  463  482 500  52   539  558  577  596  614  633 652  671  690  709  728  747  766  785 803  822  841  860  88 899  917  936 955  974  993
1006  104   123  142  161  180 2    218  237  256  275  294  312  331 350  37   389  407  426  445  464  483 501  520  54   559  578  597  615  634 653  672  691  71   729  748  767  786 804  823  842  861  880  9    918  937 956  975  994
1007  105   124  143  162  181 20   219  238  257  276  295  313  332 351  370  39   408  427  446  465  484 502  521  540  56   579  598  616  635 654  673  692  710  73 749  768  787 805  824  843  862  881  90   919  938 957  976  995
1008  106   125  144  163  182 200  22   239  258  277  296  314  333 352  371  390  409  428  447  466  485 503  522  541  560  58 599  617  636 655  674  693  711  730  75   769  788 806  825  844  863  882  900  92   939 958  977  996
1009  107   126  145  164  183 201  220  24   259  278  297  315  334 353  372  391  41   429  448  467  486 504  523  542  561  580  6    618  637 656  675  694  712  731  750  77   789 807  826  845  864  883  901  920  94 959  978  997
101   108   127  146  165  184 202  221  240  26   279  298  316  335 354  373  392  410  43 449  468  487 505  524  543  562  581  60   619  638 657  676  695  713  732  751  770  79 808  827  846  865  884  902  921  940 96   979  998
1010  109   128  147  166  185 203  222  241  260  28 299  317  336 355  374  393  411  430  45   469  488 506  525  544  563  582  600  62   639 658  677  696  714  733  752  771  790 809  828  847  866  885  903  922  941 960  98   999
1011  11    129  148  167  186 204  223  242  261  280  3    318  337 356  375  394  412  431  450  47   489 507  526  545  564  583  601  620  64 659  678  697  715  734  753  772  791 81   829  848  867  886  904  923  942 961  980
1012  110   13 149  168  187 205  224  243  262  281  30   319  338 357  376  395  413  432  451  470  49 508  527  546  565  584  602  621  640 66   679  698  716  735  754  773  792 810  83   849  868  887  905  924  943 962  981
1013  111   130  15   169  188 206  225  244  263  282  300  32   339 358  377  396  414  433  452  471  490 509  528  547  566  585  603  622  641 660  68   699  717  736  755  774  793 811  830  85   869  888  906  925  944 963  982
1014  112   131  150  17   189 207  226  245  264  283  301  320  34 359  378  397  415  434  453  472  491 51   529  548  567  586  604  623  642 661  680  7    718  737  756  775  794 812  831  850  87   889  907  926  945 964  983
1015  113   132  151  170  19 208  227  246  265  284  302  321  340 36   379  398  416  435  454  473  492 510  53   549  568  587  605  624  643 662  681  70   719  738  757  776  795 813  832  851  870  89 908  927  946 965  984




root@fhem:~# lsof -l befindet sich Anhang

Hier wundert mich der häufige Eintrag:
perl      16421            999  738u     IPv4          321679265        0t0        UDP IntelNuc-fhem.fritz.box:54720->fritz.box:domain
perl      16421            999  739u     IPv4          321655517        0t0        UDP IntelNuc-fhem.fritz.box:48578->fritz.box:domain


root@fhem:~# ls -l /proc/285/fd befindet sich Anhang

list .* FD Nach einem Neustart
Alexa                    4
Anrufliste               12
FTUIweb                  11
FileLog_Draussen_Info_Wetter     8
FileLog_Kueche_Spuelmaschine     13
Logfile                  7
Mosquitto                29
Staubsauger              82
USV                      24
WEB                      5
WEB_127.0.0.1_59692      42
WEB_192.168.178.83_63998     17
WEBtablet                6
WZ.TV                    25
XiaomiGateway            40
XiaomiGateway2           57
alexaFHEMlog             15
deCONZ                   22
global                   3
harmony                  14
harmony:discovery        38
telnetForBlockingFn_1608026736     10
telnetForBlockingFn_1608026736_127.0.0.1_58354     39


list .* FD Wenn die Auslastung steigt
Alexa                    4
Anrufliste               12
FTUIweb                  11
FileLog_Draussen_Info_Wetter     8
FileLog_Kueche_Spuelmaschine     13
Logfile                  7
Mosquitto                29
Staubsauger              82
USV                      24
WEB                      5
WEB_127.0.0.1_45118      30
WEB_192.168.178.83_49245     459
WEB_192.168.178.83_49247     461
WEB_192.168.178.83_49250     449
WEB_192.168.178.83_49251     462
WEB_192.168.178.83_49252     463
WEB_192.168.178.83_49253     464
WEB_192.168.178.83_49254     466
WZ.TV                    25
XiaomiGateway            40
XiaomiGateway2           57
alexaFHEMlog             15
deCONZ                   16
global                   3
harmony                  14
harmony:discovery        38
telnetForBlockingFn_1608026736     10


(192.168.178.83 ist die IP von meinem Laptop. War aber nur nach dem Neustart in FHEM)



Die CPU und Netzwerk Auslastung schaukelt sich über die Zeit immer höher. (Siehe Screenshot im Anhang)

Prof. Dr. Peter Henning

Scheint eher ein Netzwerkproblem als eines von FHEM zu sein.

LG

pah