Communication between browser and pi fails intermittently on Safari

This is in apache.conf on the Raspberry Pi:

KeepAliveTimeout 5

5 seconds, exactly the same as our refresh interval. Setting it to 100 helped with the error on IE.
Will test with Safari later today.

Confirmed! Changing the setting in the apache config fixes the connection issues in Safari!

In /etc/apache2/apache2.conf, if you change the KeepAliveTimeout from 5 to 99, the problem goes away.

KeepAliveTimeout 99

Now what would be the best way to handle this in our install/update script?

I’ll try this when I get home later today and fingers crossed I’ll have similar results!!! Cheers

Excellent this works does require and RPI reboot though, or atleast mine did! Thanks for sorting this

or you could just restart apache ;):

sudo service restart apache2
1 Like

I’m just seeing this error for the first time. I’ve been running with my setup for a few years, never updated it since the original install and noticed that some of the temp settings for room, fridge and beer were missing intermittently on the LCD. I then viewed via my browser and can see that the temps are randomly missing and the beer fermenting is no longer able to maintain the profile temps. I switched to Fridge Constant but it can’t maintain the temp either.

I looked in /var/www/data/beername/beer-2015-09-04-3.json and see the following:

{“c”:[{“v”:“Date(2015,8,4,23,47,36)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,45)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,45)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,45)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,51,46)”},{“v”:18.5},null,null,null,{“v”:21.0},null,{“v”:“16.0”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,53,48)”},{“v”:18.49},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“16.0”},{“v”:“6”}]},
{“c”:[{“v”:“Date(2015,8,4,23,53,48)”},{“v”:18.49},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“16.0”},{“v”:“6”}]},
{“c”:[{“v”:“Date(2015,8,4,23,53,48)”},{“v”:18.49},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“16.0”},{“v”:“6”}]},
{“c”:[{“v”:“Date(2015,8,4,23,55,49)”},{“v”:18.48},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“15.94”},{“v”:“6”}]},
{“c”:[{“v”:“Date(2015,8,4,23,55,49)”},{“v”:18.48},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“15.94”},{“v”:“6”}]},
{“c”:[{“v”:“Date(2015,8,4,23,57,50)”},{“v”:18.46},null,null,null,{“v”:21.0},null,{“v”:“15.94”},{“v”:“0”}]},
{“c”:[{“v”:“Date(2015,8,4,23,59,51)”},{“v”:18.45},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“15.94”},{“v”:“6”}]},
{“c”:[{“v”:“Date(2015,8,4,23,59,51)”},{“v”:18.45},null,null,{“v”:16.81},{“v”:21.0},null,{“v”:“15.94”},{“v”:“6”}]}]}

I changed the setting in apache2.conf to 99 but it hasn’t made a difference

Confirming change to timeout to 99 fixed it for me on iPhone6 running iOS 8.1.3(12b466). Thanks Elco.

I think you are responding with a problem that is unrelated to the discussion here.

Please upgrade to the latest version first. If you still have this problem, most likely one if the sensors is bad or the wiring.

yes, sorry. I started following the discussion

http://forum.brewpi.com/discussion/719/resolved-intermittent-cannot-receive-lcd-text-from-python-script-inconsistent-state-of-devices

which was what I was seeing on the LCD “Cannot receive LCD text from Python Script”. That led to the bug report https://github.com/BrewPi/brewpi-www/issues/42 which led to this discussion.
I take your point though and have started to check the wiring and updating the pi and arduino.

I am trying to change the KeepAlive and when I save it tells me that “cant open file to write” How do I fix this so that I can change the time to 5 to 99.

Try opening it with sudo.

1 Like

Thanks @Elco I got fixed and I’m good to go.

Hi i have the same problem every 5 sec. but can not access the file you mentioned. What to do? Not a programming expert

Is
sudo nano /etc/apache2/apache2.conf
not working?

Sorry typo fail, but The Strange thing is that the script is running fine on Chrome on my imac and android, but the script clitch is on Chrome on my ipad every 5 sec

Update, did the keepalive change to 99 and it seems that it has worked on my ipad with Chrome browser

I am using an iPhone 6 with Safari, Chrome, and Firefox. I was experiencing the intermittent LCD issue so I updated the KeepAliveTimeout to 99. Now the LCD issue is persistent. I can’t connect to the web interface with any of my browsers. After putting it back to 5, same thing. What am I doing wrong?

I had to reboot my RPI as the sudo service restart apache2 command didn’t work, did you restart?

I have. I’ve tried the service restart and rebooting, as well as refreshing the modem and router. I also hopped on my Windows laptop and installed Putty. No dice. Not sure what to try next.

I did an update and everything is working now. Awesome tool. I can’t wait until next brew day.

1 Like