OpenSprinkler Forums OpenSprinkler Mobile and Web App Mobile Web App with Screenshots (Updated) Re: Re: Mobile Web App with Screenshots (Updated)

#24203

momanz
Blocked

@salbahra wrote:

Yes, there’s three different timeouts. One is in Javascript for AJAX calls and is at the top of main.js.php. The other two are in main.php at the top. One is a socket timeout which is how long file_get_contents can wait when trying to communicate with Yahoo or OpenSprinkler. The third timer is a php execution limit. Let me know if changing any of these helps. Still find it odd only the first one has issues.

Thanks!

Ok. Looks like it’s the AJAX timeout in main.js.php. When I increase the time out to 6000 it works (the timeout is set to 5000). The Firefox developer console shows the specific operation took 5413ms. Viewing the next day preview takes 4555ms I guess this explains why I could see the next day preview and not the current day. I’m guessing the time to include the current time marker on today’s preview chart is the difference between the two operations. When I check resources on my my web server (it’s a Belkin router) loading of that preview page takes me from an idle cpu to 80-95% utilization. So simply put, I think you’re taxing my router! I wonder how my router CPU (Broadcom BCM4716 chipset) compares to the RPi server…

Could we increase the timeout to 8 or 10 sec if you don’t see an obvious inefficiency in the code.

Thanks,

-m