-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neuron crashes when I create number of nodes (160 ~ 200). #1566
Comments
This issue may have been fixed in the 2.6 branch, and can be tested with the latest code from the 2.6 branch. |
Hi, In version 2.6, is there a limit of 30 tag for modbus TCP? |
Yes, the release package Modbus RTU/TCP will also be limited by license, you can compile it yourself using the source code. |
I 've just
|
It is possible that there are not enough file descriptors, try to change the file descriptor limits. Use ulimit -n to view the current fd limit, /proc/$pid/fd directory to see the file descriptors used by processes. |
@itwasme-ulrich your problem is highly probable due to the file descriptor resource limit. |
I've just run a few performance tests because the project I'm working on requires at least 1000 Nodes. However, I encountered some issues when creating the necessary number of nodes (just creating, without any groups or tags).
Firstly, I installed Neuron by downloading the
neuron-2.5.2-linux-amd64-en.deb
package from the official website. Then, I added Modbus-TCP Node Plugins using a Template via both the Post API and manually on the dashboard. When creating about 165~168 Nodes, Neuron started crashing, and I couldn't access Neuron again through any means, even after completely pkill and restarting it. If I want to use Neuron, I'm forced to delete all data and reinstall it. The last lines of theneuron.log
don't seem to provide any useful information.:2023-09-22 12:34:10 [ERROR] storage.c:128 load node164 setting fail
2023-09-22 12:34:10 [NOTICE] event_linux.c:256 add io, fd: 1007, epoll: 1006, ret: 0
2023-09-22 12:34:10 [NOTICE] event_linux.c:213 add timer, second: 30, millisecond: 0, timer: 1010 in epoll 1006, ret: 0
2023-09-22 12:34:10 [NOTICE] adapter.c:198 Success to create adapter: node164
2023-09-22 12:34:10 [NOTICE] storage.c:371 load adapter success type:1, name:node164 plugin:Modbus TCP state:1
2023-09-22 12:34:10 [NOTICE] manager.c:283 bind node node164 to pipe(681851086)
2023-09-22 12:34:10 [WARN] persist.c:1257 SQL
SELECT setting FROM settings WHERE node_name=?
withnode165
fail: no more rows available2023-09-22 12:34:10 [ERROR] storage.c:128 load node165 setting fail
2023-09-22 12:34:10 [NOTICE] event_linux.c:256 add io, fd: 1013, epoll: 1012, ret: 0
2023-09-22 12:34:10 [NOTICE] event_linux.c:213 add timer, second: 30, millisecond: 0, timer: 1016 in epoll 1012, ret: 0
2023-09-22 12:34:10 [NOTICE] adapter.c:198 Success to create adapter: node165
2023-09-22 12:34:10 [NOTICE] storage.c:371 load adapter success type:1, name:node165 plugin:Modbus TCP state:1
2023-09-22 12:34:10 [NOTICE] manager.c:283 bind node node165 to pipe(681851089)
2023-09-22 12:34:10 [WARN] persist.c:1257 SQL
SELECT setting FROM settings WHERE node_name=?
withnode166
fail: no more rows available2023-09-22 12:34:10 [ERROR] storage.c:128 load node166 setting fail
2023-09-22 12:34:10 [NOTICE] event_linux.c:256 add io, fd: 1018, epoll: 1019, ret: 0
2023-09-22 12:34:10 [NOTICE] event_linux.c:213 add timer, second: 30, millisecond: 0, timer: 1022 in epoll 1019, ret: 0
2023-09-22 12:34:10 [NOTICE] adapter.c:198 Success to create adapter: node166
2023-09-22 12:34:10 [NOTICE] storage.c:371 load adapter success type:1, name:node166 plugin:Modbus TCP state:1
I'm assuming the issue lies with the database, so I used 'Build From Source' from the GitHub repository. With Neuron version 2.6.0, I created nodes using the same method mentioned earlier, and the number of nodes stopped at 200, then it crashed completely. Here are the last lines of the
neuron.log.
:2023-09-26 12:43:40:759 [WARN] persist.c:1294 SQL
SELECT setting FROM settings WHERE node_name=?
withnode198
fail: no more rows available2023-09-26 12:43:40:759 [WARN] storage.c:128 load node198 setting fail
2023-09-26 12:43:40:759 [NOTICE] event_linux.c:293 add io, fd: 1011, epoll: 1010, ret: 0
2023-09-26 12:43:40:759 [NOTICE] manager_internal.c:590 instantiate tmpl:tcp-template node:node198 success
2023-09-26 12:43:40:760 [NOTICE] manager.c:257 bind node node198 to pipe(106500235)
2023-09-26 12:43:40:760 [NOTICE] http.c:54 <0x6150000a0800> POST /api/v2/template/inst [200]
2023-09-26 12:43:40:828 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/node?type=1&node=&plugin= [200]
2023-09-26 12:43:40:929 [NOTICE] http.c:54 <0x615000010700> GET /api/v2/plugin [200]
2023-09-26 12:43:40:931 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/node?type=1 [200]
2023-09-26 12:43:40:946 [NOTICE] http.c:54 <0x615000010700> GET /api/v2/node/setting?node=node198 [200]
2023-09-26 12:43:40:946 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/schema?schema_name=modbus-tcp [200]
2023-09-26 12:43:43:016 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/plugin [200]
2023-09-26 12:43:43:017 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/node?type=1&node=&plugin= [200]
2023-09-26 12:43:43:032 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/node/state [200]
2023-09-26 12:43:43:733 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/plugin [200]
2023-09-26 12:43:48:260 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/template [200]
2023-09-26 12:43:51:840 [WARN] persist.c:1294 SQL
SELECT setting FROM settings WHERE node_name=?
withnode199
fail: no more rows available2023-09-26 12:43:51:840 [WARN] storage.c:128 load node199 setting fail
2023-09-26 12:43:51:840 [NOTICE] event_linux.c:293 add io, fd: 1016, epoll: 1015, ret: 0
2023-09-26 12:43:51:840 [NOTICE] manager_internal.c:590 instantiate tmpl:tcp-template node:node199 success
2023-09-26 12:43:51:842 [NOTICE] manager.c:257 bind node node199 to pipe(106500237)
2023-09-26 12:43:51:842 [NOTICE] http.c:54 <0x6150000a0800> POST /api/v2/template/inst [200]
2023-09-26 12:43:51:901 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/node?type=1&node=&plugin= [200]
2023-09-26 12:43:51:969 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/node?type=1 [200]
2023-09-26 12:43:51:972 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/plugin [200]
2023-09-26 12:43:51:990 [NOTICE] http.c:54 <0x6150000a0800> GET /api/v2/schema?schema_name=modbus-tcp [200]
2023-09-26 12:43:51:991 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/node/setting?node=node199 [200]
2023-09-26 12:43:54:058 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/node?type=1&node=&plugin= [200]
2023-09-26 12:43:54:058 [NOTICE] http.c:54 <0x615000010700> GET /api/v2/plugin [200]
2023-09-26 12:43:54:072 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/node/state [200]
2023-09-26 12:43:55:053 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/plugin [200]
2023-09-26 12:43:57:818 [NOTICE] http.c:54 <0x6150000b0700> GET /api/v2/template [200]
I also encounter a similar issue when using it on Raspberry Pi 3B+.
On the Docs page, I can see performance tests with up to 1000 nodes, so I'm wondering if you have any solutions to this problem.
The text was updated successfully, but these errors were encountered: