Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ia728188's avatar

Out of free disk space when running on Digital Ocean

I currently have a Laravel app deployed on DigitalOcean. I just attempted to visit the index page today and receive a long stack trace with an error:

ErrorException thrown with message "file_put_contents(): Only 0 of 197 bytes written, possibly out of free disk space" Stacktrace: #11 ErrorException in /var/www/sm-system/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:71 #10 
...
lluminate\Foundation\Application:run in /var/www/sm-system/public/index.php:49
file_put_contents(): Only 0 of 197 bytes written, possibly out of free disk space

I cleared app/storage/sessions but still doesn't work

0 likes
5 replies
boynet's avatar

did you check that you have free space?

ia728188's avatar

Yes, I checked and strangely it seemed the whole disk was full.

Anyhow, I installed ncdu and found that there was a secret /log folder taking up almost all the space. Assuming this was accumulated somehow by Laravel but will investigate further.

Thanks

willvincent's avatar

Yeah, log files can grow wildly out of control if left unchecked. A good log rotator/compressor is definitely a worthwhile addition to any system, if not already in place.

Please or to participate in this conversation.