thingsboard / thingsboard-gateway

Open-source IoT Gateway - integrates devices connected to legacy and third-party systems with ThingsBoard IoT Platform using Modbus, CAN bus, BACnet, BLE, OPC-UA, MQTT, ODBC and REST protocols
https://thingsboard.io/docs/iot-gateway/what-is-iot-gateway/
Apache License 2.0
1.65k stars 801 forks source link

Memory usage remains high #1445

Open ultimate-smile opened 5 days ago

ultimate-smile commented 5 days ago

Describe the issue The gateway only mounted two or three devices and sent telemetry data once a second (using the opcua protocol). The memory occupied by a single gateway remained high, from more than 1G at the beginning to more than 6G later.

Configuration (Attach your configuration file) Notate: Remove Access token from file if you want to attach a tb_gateway.yaml

Connector name (If you need help with some connector/converter): [opcua Connector]

Error traceback (If it was raised):

'deviceName'
Traceback (most recent call last):
  File "<input>", line 2, in <module>
KeyError: 'deviceName'

Versions (please complete the following information):

imbeacon commented 2 days ago

Hi @ultimate-smile,

Please provide more information about your environment - What is the verison of ThingsBoard? Do you have enabled remote logging?

Because to send a data to the server mqtt client uses internal queue, and it can use the memory in this way in case of having a lot of messages. You can easily track it just by enabling/disabling remote logging feature.