4

I'm working on a project which aims to connect +1k devices to a machine, which may probably autoscale. The problem is that with only 2 connected devices, the IDAS IoTAgent ends in a couple of days with a "Memory exhaust" message. It is running in a docker instance in a machine in AWS m3.medium with memory swap.

On the other hand, the git repository is not longer maintained as far as I can see, since there are not commits since Dec 16'. Is this a recomendable Generic Enabler for production? Has it been tested for a big amount of connected devices? Is this actually out of maintenance?

Here it is the url to the git repo:

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

Thanks in advance

JoseBenitez
  • 125
  • 6
  • 1
    The last commit on the url you informed is from last December: `Latest commit 9b0cb99 on 19 Dec 2016`. There is also this branch, of Jul 16': https://github.com/telefonicaid/lwm2m-node-lib ... – Dalton Cézane Jul 18 '17 at 21:19

1 Answers1

2

Sorry for the delay and thank you a lot for your interest in Fiware and for having put this issue to our attention. Let me answer to your questions one by one:

Indeed the issue is related to a bug in a config.js IotAgent LWM2M.

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

The payload is malformed and it return the following error:

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

To solve it, you must create an attribute called: 'devicedRegistry' in the payload config.js as 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 a LWM2M client has active attributes, the agent sends an observe instruction for each one, just after the client registers. This may cause an error when the client takes too long to start listening, as the observe requests may not reach its destiny.

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

Secondly, is this a recommendable Generic Enabler for producction? Absolutely yes. It has been tested for a big amount of connected devices. We were a bit surprised by your situtation indeed what we have through our quality assurance team is that In that they assessed that the IoT Agent was able to manage up to 140 updates per second, i.e., 140 requests from devices. We don’t have the number of devices as these updates may come from one or several devices. For 100 concurrent threads, it was able to manage in average 114 updates/sec. If we increment the number of concurrent threads, 140 updates/sec will be the cap. I hope this will give you a reference figure. just ket us know which are your requirements and we will come back to you with additional info.

Finally, is this actually out of maintenance? No it isn't. Currently, the plan
is is to have a new version of the IoT Agent to be fully compliant with FIWARE NGSI v2. Indeed, I guess you already spotted it the current version refers only to FIWARE NGSI v1.

In addition new enhancements will appear soon. As you might know all the developments of Fiware technologies are done by the Fiware Open Source Community and as any open source community we are committed to fix bugs, if any, and to provide enhancements, but this according to the priorities of the community members. As fiware foundation we have very limited resources but flexible enough to put them at disposal of things that we found critical (as this bug you found), but the large bunch of the work is done by the community.

Just let us know if this fixes your problem and we hope all of the above helps you in solving your issues and understand the matter. Serving people like you is our mission !

Kind Regards !