2022-12-03 12:11:58.409|ERROR|emoncms_mqtt.php|ErrorException: mysqli::query(): (HY000/3): Error writing file ‘/tmp/MYos5EUQ’ (Errcode: 28 “No space left on device”) in /var/www/emoncms/Modules/input/input_model.php:734
Stack trace:
Got this message from the log file. Restarted the system and mosquito but didn’t help.
The df command is entered at the command line. It shows how much disk is free (df, disk free).
You could get similar details by going to the Admin: System Info in the emoncms left menu and looking under the Disk heading. Paste it here for helpers to read, please.
I think something has happened such that a process has left some files in the directory that need to be manually removed.
A bit of digging and I find that the /tmp folder should be cleaned regularly by a service called systemd-tmpfiles.
You can check when it was last run with
pi@emonpi:~ $ systemctl list-timers
Mine looks like this.
NEXT LEFT LAST PASSED UNIT ACTIVATES
Sun 2022-12-04 17:07:01 GMT 10min left Sun 2022-12-04 00:03:37 GMT 16h ago apt-daily.timer apt-daily.service
Sun 2022-12-04 17:09:00 GMT 12min left Sun 2022-12-04 16:39:37 GMT 16min ago phpsessionclean.timer phpsessionclean.service
Mon 2022-12-05 00:00:00 GMT 7h left Sun 2022-12-04 00:00:37 GMT 16h ago logrotate.timer logrotate.service
Mon 2022-12-05 00:00:00 GMT 7h left Sun 2022-12-04 00:00:37 GMT 16h ago man-db.timer man-db.service
Mon 2022-12-05 06:08:15 GMT 13h left Sun 2022-12-04 06:09:37 GMT 10h ago apt-daily-upgrade.timer apt-daily-upgrade.service
Mon 2022-12-05 10:38:37 GMT 17h left Sun 2022-12-04 10:38:37 GMT 6h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Checking on my system and I see there were 2 files sitting there that are not being cleaned up - so it does happen. I’ve now removed them.
You need to SSH in and list the files in the /tmp folder and we can see what needs to be deleted.
[edit]
Interestingly, it looks like the standard configuration expressly tells the clean process not to clean the tmp folder
pi@emonpi:~ $ cat /usr/lib/tmpfiles.d/tmp.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# See tmpfiles.d(5) for details
# Clear tmp directories separately, to make them easier to override
D /tmp 1777 root root -
As far as I can deduce from the man file, the trailing - means no automatic clean-up is done.
The controlling of clearing is done by this service. Some file (those still in my tmp folder are specifically only removed/updated at boot. So if not cleared on the timer, then no they won’t be cleared on boot (as the OP has discovered).
in my analysis I used 87% of /tmp allready. Which is limited to 30M …
as I’m a starter, there is not valuable data on it. As I’ve some free SD-cards hanging around (of a SLR camera), which is the easiest way to migrate to a new SD-Card
is there a topic on migrating?
will 64G suite my system?