Page 1 of 1

Code took too long to return result

Posted: 31 Aug 2014 15:54
by zoic22
Hi,

I used zway application only by api and I have often this return message :

Code: Select all

Error 500: Internal Server Error
Code took too long to return result
Why I get that ? And how to solve it ? I empty automation folder (and restart rasberry) but I still have the error.

Did know how to solve that ?


Thank in advance

Re: Code took too long to return result

Posted: 31 Aug 2014 17:10
by pofs
What kind of requests are you executing which give you such response?
There's a timeout on waiting for response if it is executing too long. Also this might happen if you're making too much simultaneous requests.

Re: Code took too long to return result

Posted: 31 Aug 2014 18:00
by zoic22
My request it's like
/ZWaveAPI/Run/devices[24].instances[2].commandClasses[0x25].Set(0)

Maybe it's due to simultaneous request, I do 1 resquest each minute to know change on zwave, and some other request to do action. What is the limit ?

Re: Code took too long to return result

Posted: 02 Sep 2014 15:41
by pofs
Requests executing once a minute are hardly considered simultaneous :)
HA UI makes approximately 2 requests a second, and server handles it fine.

I still think something is polling your RaZberry wa-a-ay more often.
Another option is some heavy JS code which is blocking server on either timer, event or web request. But you say you deleted automation folder (and restarted z-way-server after that?), so timers and events shouldn't be an issue.

Look in the log. Every JS request is logged there with a timestamp.