thorrak/fermentrack

Backing up gets a 502 Bad Gateway

Opened this issue · 2 comments

Hey there -
I've upgraded to the latest version of fermentrack (although this happened on the previous version). When I click the "Add Backup" button, it takes its time running (I have probably 20 or so past beer logs), and then gives me a bad gateway page saying:

502 Bad Gateway
nginx/1.18.0

Is this something on my end? Some timeout variable I need to change? I have been able to back up in the past, but not for a few months.

Thanks for reporting this. Another user was having the same issue, but I thought it was something specific to his setup. The fact that you're experiencing it as well means that it's something deeper that will require some additional work to resolve.

The issue appears to be something with he fact that I'm generating the backup synchronously with processing the web request. As a workaround, you can SSH into your Pi/server, go to the fermentrack-tools directory, make sure you are on the latest version of both Fermentrack and fermentrack-tools, and then run the following command to generate a backup manually:

docker compose run --rm django python manage.py generate_backup

Once this completes, you should be able to see & download the backup inside Fermentrack's web interface.

The workaround seems to work, thanks!