500 Error During Discourse Upgrade | Discourse Upgrade Encountered 500 Error

When upgrading Discourse, the system returned an error:

This error was strange, directly resulting in a 500 error, making it impossible to view any other error messages.

Later, by checking the server logs, we saw:

Looking at this, it seems the installation was not successful.

Cause of Error

Regarding the error cause above, the official explanation suggests running the rebuild command on the server.

cd /var/discourse
./launcher rebuild app

Subsequently, we observed Discourse fetching Docker-related containers and code from the server.

However, the upgrade still failed, with the reason being insufficient disk space on the server.

This upgrade requires at least 5GB of disk space.

The solution is to delete old Docker images.

From this, we learned that Discourse does not delete old Docker images with each upgrade. As the number of upgrades increases, this leads to a significant increase in disk space usage.

The simplest solution is to use the ./launcher cleanup command to delete them.

Just to check @honeymoose, was this one intended as a guide?

@JammyDodger

This more like the running issue we found.

We can think this is the guide for user who upgrade Discourse better to run cleanup more often.

Thinks.