Page 1 of 1
ZWay service crashes when soliciting updates via JSON API
Posted: 19 Nov 2014 11:34
by radu122
I am using the HTTP JSON API provided by the ZWay service.
For some devices, I am sending periodical (about 2 minutes) GET commands where I see that the value has not updated for that 2 minute period. Because of this, from time to time, the ZWay service gets 100% of the processor and does not respond anymore (not to the http api, not to the web interface). I am sure it is because of the GET commands, because I have been using the API since february, and this has never happened until I introduced this perioadical GET.
Could you advise me on the problem? Is it ZWave protocol related, or a HTTP server problem?
PS: The logs get horribly big, especially with debug level. Can't they be split by days?
Re: ZWay service crashes when soliciting updates via JSON AP
Posted: 19 Nov 2014 17:15
by PoltoS
On Razberry logrotate should be configured.
Show us how to reproduce the bug, version number etc.
Re: ZWay service crashes when soliciting updates via JSON AP
Posted: 20 Nov 2014 11:41
by radu122
I cannot use logrotate because I don't have a Razberry, I use Windows.
Specs:
- Z-ZWay for Windows, v 1.4.0.2
- Windows 7 64 bit
- Intel Pentium Dual CPU 1.80 Ghz, 2 GB Ram
I use the HTTP JSON API in the following way (since february):
- querying frequently (every 300 ms) with the function "Data/[timestamp_last_update]" to get fresh values from the devices
- using the SET functions when needed
The new functionality I added recently was (added it for perioadically checking the movement status of my AEON_MULTISENSOR):
- every 10 seconds, I check (with my cached values) which device of type SWITCH_BINARY has the timestamap of "level.updateTime" that has not been updated for at least 2 minutes, I issue a GET command for that command class, device id, instance id.
- I do not issue a GET if the device has not been updated for more than a day (because it is failed or unplugged)
I have about 8 sensors which get this perioadical GETs.
The result of adding this code is that the ZWay service perioadically gets blocked or crashes completely.
I have done a test where I use the same HTTP session for all commands, and in that scenario, the server does not crash, whereas if I use a new HTTP session for each call, it will crash. When I use the same HTTP session, it means that I cannot issue 2 commands at the same time. So, I have a feeling it has something to do with the webserver of the API? Maybe related to the GET command?
Thanks
Re: ZWay service crashes when soliciting updates via JSON AP
Posted: 20 Nov 2014 12:23
by pz1
Found this for you
http://sourceforge.net/projects/logrota ... =directory. Haven't tested it.
I leave the remainder of your question to PoltoS
Re: ZWay service crashes when soliciting updates via JSON AP
Posted: 09 Dec 2014 03:34
by PoltoS
This is a known problem and is fixed a long time ago. Unfortunately Windows s/w was not updated for quite some time. We are working on this.
Re: ZWay service crashes when soliciting updates via JSON AP
Posted: 11 Dec 2014 15:09
by radu122
So if I were to use the service for Ubuntu, I would find a much fresher version and the problems would not occur?