My BrewPi has been acting up lately. Among other things, the time it takes to export the current beer to CSV has gone way up. This used to be effectively an immediate download but can now take 1+ minutes and sometimes doesnāt even complete.
In fact I have a pretty solid repro case where if I take an otherwise well-behaved BrewPi and ask for a refreshed main graph and then a CSV download prior to the graph being replotted, the Piās web page eventually becomes unresponsive and the IP address no longer returning pings on my home network, forcing me to go and do a cold restart of both Spark and Pi. The Pi can run fine for days prior to becoming unresponsive with these steps, so I canāt believe that it āgoing darkā is 100% coincidental.
The first thing I want to do in addressing this issue is get rid of old JSON data. What is the location of the logged data, and is it just a case of deleting any files written / touched on some specific dates? Iād rather root out specific beers if thatās possible. Some of my logged beers are less important than others.
p.s. the Pi is on a reserved IP address within my LAN, so I donāt have a reason to suspect this is related to IP routing issues
p.p.s. I have tried to remove entire directories from /home/brewpi/data using ārm -r ā¦ā, but this doesnāt seem to cause the data to actually go away. By that I mean that I can still see the deleted beer in the dropdown of previous beers, refreshing the browser page doesnāt cause the line item to disappear from the dropdown, and I can still download the relevant CSV data.
Yes, I do start a new data set that way for each new fermentation. Is there a change I should make to my workflow which would decrease the likelihood of this (theoretic) problem?
Actually, now that I think about it: downloading the CSV file should be almost instant. It is already on sitting on the web server, it only needs to be downloaded.
if you run top, what is reported as the load average?
+1 to the set of issues & weird behavior caused by a substandard source of AC power. Today I noticed that the Sparkās touchscreen UI seemed to be flickering ever so slightly, which Iāve not seen before. Given that the Spark currently gets its power over USB cable from one of the Piās USB ports, I decided to start from the AC outlet and replace cables.
I reverted to the 2A Universal power supply which came in my original BrewPi store order, which I abandoned a while back because of its inconvenient girth & shape. But sure enough, with the 2A supply the system seems a lot more stable.
Another observation: occasionally when rebooting the Pi, the Spark would flash intermittently and otherwise do nothing, instead of going quickly through its power-up sequence. I had always put this down to quirky board behavior. If others see this kind of power-up in their Spark then you should consider AC power as the root cause.
The logging of my brewpi has also been acting up (load same (stopped) beer log upon reboot) and I tried removing both logged data and beer profiles in the hope that it would resolve it.
Cd to proper folders first (cd /home/brewpi/data ; cd /var/www/html/data; cd /var/www/html/data/profiles) then remove data with rm -rf folder_name. Files are owned by brewpi or www-data. I run brewpi 0.4.4 with tilt integration.
However, as soon as I reboot the system, all of the data pops back into place. Sudoāing the command does not help, as well as stopping the script, removing files and rebooting. What can I do more?
Also remove them from /home/pi/brewpi/data, the files are stored by python there and copied to the web dir. If I remember it correctly, it has been 5 years since I worked on or used the Arduino version.
Hi Elco, thanks for the quick reply! I see that I donāt have a folder /home/pi/brewpi/data; I think I installed the files one folder above so that the files are in /home/brewpi/data. Is there another location I could find a possible source files?
In case of completeness, all the files/folders in /home/pi are: .AppleDB, .AppleDesktop, .AppleDouble, .Xauthority, .asoundrc, .bash_history, .bash_logout, .bashrc, .cache, .config, .dbus, .gconf, .gstreamer-0.10, .local, .pki, .profile, .selected_editor, .themes, .viminfo, .xsession-errors, .xsession-errors.old, Desktop, Documents, Downloads, Music, Network Trash Folder, Pictures, Public, Templates, Temporary Items, Videos, beer-chart.js, brewpi-tools, install.log, installfilesbrewometer, python_games
I indeed see the same files as in the web directory, but even if I delete them, and I do a reboot, I see the same files appear. Does this mean that the removal itself is not really working (sudo rm -rf folder_name)? I donāt see the folders anymore if I run the command and run ls -la, but they reappear after reboot. Or would this mean something is wrong with the SD card (as a source online tells me)?
Thanks again for the quick answer! Thatās what Iāve been doing, but they reappear in both folders, oddly! Iāve started each new brew from the web interface.
Perhaps my latest finding helps someone else: by updating to brewblox yesterday I found out that the SD card was corrupted and that I could not install / write anything. So thatās what prevented my to start something really new!