out of space - bad mmkay.
Opened this issue · 4 comments
[2013-08-28 10:46:58,984] INFO: Downloading https://botqueue.s3.amazonaws.com/assets/e4/06/d4/9e/ee/torus.gcode to /home/pi/BotQueue/bumblebee/cache/c87f296bb999c199875706909d0c4e98-torus.gcode
[2013-08-28 10:47:02,616] ERROR: [Errno 28] No space left on device
Traceback (most recent call last):
File "/home/pi/BotQueue/bumblebee/hive.py", line 108, in downloadFile
self.localFile.write(data)
IOError: [Errno 28] No space left on device
we should also implement some sort of log rotation and deletion of cached files.
At what sizes should we rotate the logs and delete the cached files?
I was thinking about this, and deleting the cache files is definitely an obvious and easy solution, what about the logs? Then I wondered if botqueue could support holding log files in S3 or if we'd even want that. Otherwise, they're just going to be deleted. Is there any worth keeping them?
If we rotated the logs at 10MB, and only kept 10 of them on S3 (rotating them as needed), we'd have the previous 10 for debugging improvements and the current one, if there's an issue, can be given to us.
I'm curious what are other's opinion of this.
The log files currently rotate at 25 MB, and there's two of them max, so 50 MB total. As for the cache, I'm currently trying to figure out how to determine when the device has run out of space. We also need to figure out how much space we need extra. Should we just destroy the entire cache? If that's not enough, I guess we just raise an error.