Thank you, I will try and let you know. -m
> On 31 Jan, 2019, at 22:25 , Dan Morphis <d...@milkcarton.com> wrote: > > Try setting the next level and batch size smaller and see if that helps. Put > this in your config.json: > > "GPN_NEXT_LEVEL": 3, > "GPV_BATCH_SIZE": 24, > > > > On Thu, Jan 31, 2019 at 12:23 PM Simon Ryf <simon....@dualstack.ch> wrote: > Sorry I’m tiered – it isn’t about extensions but general device timeout… > > > > From: Users <users-boun...@lists.genieacs.com> on behalf of Simon Ryf > <simon....@dualstack.ch> > Reply-To: Community support for GenieACS users <users@lists.genieacs.com> > Date: Thursday, 31 January 2019 at 22:22 > To: Community support for GenieACS users <users@lists.genieacs.com> > Subject: Re: Extensions timeout > > > > Dan and Zaid – do you know that you’re still having a “bug” when using Node > >=8.x on that? > > > > https://nodejs.org/api/http.html#http_server_keepalivetimeout > > > > you need to fix that in server.js I can give you the code I’ve added for that. > > I’m not really a Node dev and therefore I didn’t yet made a pull request… > > > > Cheers > > Simon > > > > From: Users <users-boun...@lists.genieacs.com> on behalf of Dan Morphis > <d...@milkcarton.com> > Reply-To: Community support for GenieACS users <users@lists.genieacs.com> > Date: Thursday, 31 January 2019 at 20:54 > To: Community support for GenieACS users <users@lists.genieacs.com> > Subject: Re: Extensions timeout > > > > You can increase the extension timeout by adding "EXT_TIMEOUT": 30000, to the > genieacs/config/config.json file. Timeout is in milliseconds. > > > > -dan > > > > On Tue, Jan 29, 2019 at 11:27 PM Mirek Lauš <mi...@laus.cz> wrote: > > Hello Genieacs users, > > my extensions sometimes results in timeout without a reason giving a NodeJS > error in the log: > > > 1: node::Abort(void) [/usr/local/bin/node] > > 2: node::PlatformInit(void) [/usr/local/bin/node] > > 3: node::Start(int, char**) [/usr/local/bin/node] > > 4: _start [/usr/local/bin/node] > > My extension is called from Provision script: > > > let genieacsId = declare("DeviceID.ID", {value: 1}).value[0]; > > let externalIp = > > declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.ExternalIPAddress", > > {value: 1}).value[0]; > > let connReqUrl = > > declare("InternetGatewayDevice.ManagementServer.ConnectionRequestURL", > > {value: 1}).value[0]; > > > > let args = {id: genieacsId, url: connReqUrl, ip: externalIp}; > > > > log('remoteCallback call script'); > > > > let resp = ext('remote', 'remoteCallback', JSON.stringify(args)); > > log('remote response ' + genieacsId + ': ' + resp); > > And the extension: > > > const API_URL = 'https://remote.url/api/genieacs'; > > const url = require("url"); > > const http = require(API_URL.split(":", 1)[0]); > > > > const logger = require('../../lib/logger'); > > > > function remoteCallback(args, callback) { > > > > let params = JSON.parse(args[0]); > > > > const uri = API_URL + "/callback.pl?id=" + params.id + "&url=" + > > params.url + "&ip=" + params.ip; > > > > let options = url.parse(uri); > > options.headers = { accept: 'application/json', "content-type": > > 'application/json' }; > > > > logger.info({message: 'post callback ' + params.id}); > > > > let request = http.get(options, function (response) { > > > > if (response.statusCode == 404) { > > return callback(null, null); > > } > > > > if (response.statusCode >= 400) { > > return callback(new Error("Unexpected error. Response Code: " + > > response.statusCode + '. Status Message: ' + response.statusMessage + > > '. t: ' + typeof response.statusCode)); > > } > > > > let data = ""; > > > > response.on("data", function(d) { > > data = data + d.toString(); > > }); > > > > response.on("end", function () { > > logger.info({message: 'post callback response: ' + data}); > > return callback(null,data); > > }); > > > > }); > > > > request.on("error", function (err) { > > logger.info({message: 'post callback error: ' + err}); > > callback(err); > > }); > > > > } > > > > exports.remoteCallback = remoteCallback; > > > How to debug this? > > Regards > Mirek > _______________________________________________ > Users mailing list > Users@lists.genieacs.com > http://lists.genieacs.com/mailman/listinfo/users > > _______________________________________________ > Users mailing list > Users@lists.genieacs.com > http://lists.genieacs.com/mailman/listinfo/users > _______________________________________________ > Users mailing list > Users@lists.genieacs.com > http://lists.genieacs.com/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.genieacs.com http://lists.genieacs.com/mailman/listinfo/users