Page 1 of 1

Getting 400 Bad Request and socket hang ups

Posted: Thursday 12 November 2015 9:41
by thos
Hi all,
I'm trying to use this - https://github.com/fergalom/node-spc-do ... binding.js to bind SPC Gateway to Domoticz

The script is pretty straightforward and pulls some variables (20 or so) and looks to push them to Domoticz.
Problem being, on first pass it creates and saves about 6 variables, next pass 2 or 3, then another 2 or 3, and then just starts to fail.
It will only get to around 11 variables before it wont do any more. Variables are all pretty much named same with number identifiers.

The requests and source all look fine, but I'm struggling to understand how it's failing with Domoticz.

Is there any limitations on number of open requests at a time? Do I need to slow down this script somewhat?
What else would cause a 400 Bad Request, on an otherwise normal looking request?
I also get some 'socket hang up's , again anything from Domoticz that would cause this?

I'm running v2.3552 loaded at the weekend. It's a pretty fresh install, about 20-30 switches added and some other scripts updating variables at 5min intervals.

Thanks,
Tom

Re: Getting 400 Bad Request and socket hang ups

Posted: Thursday 12 November 2015 20:08
by thos
Is this a case of flooding too many API calls to Domoticz at same time? As soon I reduce the number of calls, it's fine.

Is there any limit to number of Domoticz threads/sockets/servers that are listening?

Re: Getting 400 Bad Request and socket hang ups

Posted: Thursday 12 November 2015 20:53
by thos
Some retry logic on 400 errors seems to have worked. 26 variables now loading nicely.

It would have been nice to get some easier logging to see what was being received on Domoticz side, and to know if there were options to increase number of threads/servers/sockets.