A systemd service running on a Raspberry Pi began producing unusual logs. As I recall, the errors indicated that it was failing to publish messages to RabbitMQ.

Since RabbitMQ was used to collect sensor readings, I checked the sensor tables in the database. No new data had been recorded for several days, and the point at which the data stopped matched the time the errors had started appearing.

Sensor readings were being recorded in multiple tables every three seconds. Knowing that the Raspberry Pi was running on a 32GB SD card, I checked the remaining disk space.

It was completely full. MariaDB alone was taking up more than 15GB.

The project was still in development, and none of the stored data was important, so I decided to reset the database altogether. I ran DROP DATABASE IF EXISTS database_name;, expecting that to settle the matter.

Instead, it failed. There was not enough disk space left to delete the database.

After thinking for a moment, I decided to clear out unnecessary log files first. Once a small amount of space was freed, I ran DROP DATABASE again. This time it worked, and the problem was resolved.

I had intended to write a script to automatically delete old sensor data every fifteen or thirty days so that it would not happen again.

I have been busy with other things, and I still have not written it.