IoT Agent LWM2M Exhaust and Production Memory Environment

I am working on a project that aims to connect + 1k devices to a machine that could possibly be autoscaled. The problem is that with only two devices connected, the IDA IoAgent ends after a couple of days with the message "Memory Out". It runs on a docker instance in a machine in AWS m3.medium with memory swap.

On the other hand, the git repository is no longer maintained as far as I can see since there have been no commits since December 16th. Is this the recommended Generic Enabler for production? Has it been tested on a large number of connected devices? Is this really not supported?

Here's the git repo url:

https://github.com/telefonicaid/lightweightm2m-iotagent

Thank you in advance

+3


source to share


1 answer


Sorry for the delay and thank you very much for your interest in Fiware and for bringing this issue to our attention. Let me answer your questions one by one:

In fact, the problem is related to a bug in config.js IotAgent LWM2M.

https://github.com/Fiware/iot.IoTagent-LWM2M/blob/master/docs/deviceProvisioning.md

The payload is invalid and returns the following error:

**op=IoTAgentNGSI.DbConn | msg=No host found for MongoDB driver.**

      

To solve this problem, you must create an attribute "devicedRegistry" in the payload config.js follows:

var config = {};
config.lwm2m = {
logLevel: 'DEBUG',
port: 5684,
defaultType: 'Device',
ipProtocol: 'udp4',
serverProtocol: 'udp4
delayedObservationTimeout: 50,
formats: [
    {
        name: 'application-vnd-oma-lwm2m/text',
        value: 1541
    },
    {
        name: 'application-vnd-oma-lwm2m/tlv',
        value: 1542
    },
    {
        name: 'application-vnd-oma-lwm2m/json',
        value: 1543
    },
    {
        name: 'application-vnd-oma-lwm2m/opaque',
        value: 1544
    }
  ],
writeFormat: 'application-vnd-oma-lwm2m/text',
types: [ ]
};
config.ngsi = {
   logLevel: 'DEBUG',
   contextBroker: {
      host: 'localhost',
      port: '1026'
},
server: {
    port: 4041,
    host: 'localhost'
},
deviceRegistry: {
    type: 'mongodb'
},
mongodb: {
    host:'172.17.0.2',
    db: 'iotagentLW2M2M'
},
types: { },
service: 'smartGondor',
subservice: '/gardens',
providerUrl: 'http://localhost:4041',
deviceRegistrationDuration: 'P1M'
};
module.exports = config;

      



Remember that when an LWM2M client has active attributes, the agent sends a watch statement for each one immediately after the client registers. This can lead to an error when the client starts listening for too long, as watch requests may not reach their destiny.

So make sure you are using the timeout correctly to give the client a chance to create a listener before the server sends requests

Second, is this the recommended Generic Enabler for production ? Absolutely yes. It has been tested on a large number of connected devices. We were a little surprised by your situation that what we have thanks to our QA team is that they estimated that the IoT agent was able to manage up to 140 updates per second, or 140 requests from devices. We don't have a device count as these updates can come from one or more devices. For 100 concurrent threads, it was able to manage an average of 114 updates / sec. If we increase the number of simultaneous threads, then there will be 140 updates / sec. Hope this gives you a link. just tell us what your requirements are and we will get back to you with more information.

Finally, is this actually not supported? No, it is not. The current plan
is for the new version of the IoT agent to be fully FIWARE NGSI v2 . Indeed, I think you have already noticed that the current version only applies to FIWARE NGSI v1 .

Plus, new improvements are coming soon. As you know, all Fiware technology development is done by the Fiware Open Source development community, and like any open source community, we strive to fix bugs, if any, and provide improvements, but this is in line with the priorities of the community members. As a foundation for protection against unauthorized use, we have very limited resources, but flexible enough to give them access to things that we found to be critical (like this bug you discovered), but most of the work is done by the community.

Just let us know if this fixes your problem, and we hope that all this will help you solve your problems and understand the essence of the problem. Serving people like you is our mission!

Respectfully!

+2


source







All Articles