-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Trying to connect to a invalid/non exisiting/offline tcp socket/server, causes to spwan worker, but do not exit.
This creates a memory leak.
Related/debugging information: #61
A watch on watch -n 10 "systemctl status connector" and trying to connect to a offline raspberry increases the Tasks number continusly.
● connector.service - OpenHaus SmartHome/IoT connector
Loaded: loaded (/usr/lib/systemd/system/connector.service; enabled; preset: disabled)
Active: active (running) since Sat 2024-10-26 12:46:59 CEST; 2 days ago
Docs: https://open-haus.io
Main PID: 51700 (node)
Tasks: 87 (limit: 11107)
Memory: 645.1M
CPU: 17min 31.599s
CGroup: /system.slice/connector.service
└─51700 /usr/bin/node index.js
Oct 28 16:47:48 open-haus.lan node[51700]: Worker spawend for url http://127.0.0.1:8080/api/devices/66e4a0de72e58e7085f2a2db/interfaces/66e4a0de72e58e7085f2a2dc
Oct 28 16:47:51 open-haus.lan node[51700]: [2024.10.28 - 16:47.51.943][error][system] [error] tcp://192.168.2.178:8080 Error: connect EHOSTUNREACH 192.168.2.178:8080
Oct 28 16:47:51 open-haus.lan node[51700]: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) {
Oct 28 16:47:51 open-haus.lan node[51700]: errno: -113,
Oct 28 16:47:51 open-haus.lan node[51700]: code: 'EHOSTUNREACH',
Oct 28 16:47:51 open-haus.lan node[51700]: syscall: 'connect',
Oct 28 16:47:51 open-haus.lan node[51700]: address: '192.168.2.178',
Oct 28 16:47:51 open-haus.lan node[51700]: port: 8080
Oct 28 16:47:51 open-haus.lan node[51700]: }
Oct 28 16:47:51 open-haus.lan node[51700]: [2024.10.28 - 16:47.51.945][debug][system] [closed] tcp://192.168.2.178:8080
● connector.service - OpenHaus SmartHome/IoT connector
Loaded: loaded (/usr/lib/systemd/system/connector.service; enabled; preset: disabled)
Active: active (running) since Sat 2024-10-26 12:46:59 CEST; 2 days ago
Docs: https://open-haus.io
Main PID: 51700 (node)
Tasks: 93 (limit: 11107)
Memory: 687.9M
CPU: 17min 34.622s
CGroup: /system.slice/connector.service
└─51700 /usr/bin/node index.js
Oct 28 16:50:44 open-haus.lan node[51700]: Worker spawend for url http://127.0.0.1:8080/api/devices/66e4a0de72e58e7085f2a2db/interfaces/66e4a0de72e58e7085f2a2dc
Oct 28 16:50:47 open-haus.lan node[51700]: [2024.10.28 - 16:50.47.495][error][system] [error] tcp://192.168.2.178:8080 Error: connect EHOSTUNREACH 192.168.2.178:8080
Oct 28 16:50:47 open-haus.lan node[51700]: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) {
Oct 28 16:50:47 open-haus.lan node[51700]: errno: -113,
Oct 28 16:50:47 open-haus.lan node[51700]: code: 'EHOSTUNREACH',
Oct 28 16:50:47 open-haus.lan node[51700]: syscall: 'connect',
Oct 28 16:50:47 open-haus.lan node[51700]: address: '192.168.2.178',
Oct 28 16:50:47 open-haus.lan node[51700]: port: 8080
Oct 28 16:50:47 open-haus.lan node[51700]: }
Oct 28 16:50:47 open-haus.lan node[51700]: [2024.10.28 - 16:50.47.497][debug][system] [closed] tcp://192.168.2.178:8080
● connector.service - OpenHaus SmartHome/IoT connector
Loaded: loaded (/usr/lib/systemd/system/connector.service; enabled; preset: disabled)
Active: active (running) since Sat 2024-10-26 12:46:59 CEST; 2 days ago
Docs: https://open-haus.io
Main PID: 51700 (node)
Tasks: 102 (limit: 11107)
Memory: 768.2M
CPU: 17min 40.018s
CGroup: /system.slice/connector.service
└─51700 /usr/bin/node index.js
Oct 28 16:56:35 open-haus.lan node[51700]: Worker spawend for url http://127.0.0.1:8080/api/devices/66e4a0de72e58e7085f2a2db/interfaces/66e4a0de72e58e7085f2a2dc
Oct 28 16:56:38 open-haus.lan node[51700]: [2024.10.28 - 16:56.38.535][error][system] [error] tcp://192.168.2.178:8080 Error: connect EHOSTUNREACH 192.168.2.178:8080
Oct 28 16:56:38 open-haus.lan node[51700]: at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1607:16) {
Oct 28 16:56:38 open-haus.lan node[51700]: errno: -113,
Oct 28 16:56:38 open-haus.lan node[51700]: code: 'EHOSTUNREACH',
Oct 28 16:56:38 open-haus.lan node[51700]: syscall: 'connect',
Oct 28 16:56:38 open-haus.lan node[51700]: address: '192.168.2.178',
Oct 28 16:56:38 open-haus.lan node[51700]: port: 8080
Oct 28 16:56:38 open-haus.lan node[51700]: }
Oct 28 16:56:38 open-haus.lan node[51700]: [2024.10.28 - 16:56.38.537][debug][system] [closed] tcp://192.168.2.178:8080
start to watch:
16:23 = 49
16:25 = 51
16:28 = 54
16:33 = 63
16:37 = 69