Root Access Daily
Root Access Daily
@RootAccessDaily

Reclaimed 22GB and a dead box from one runaway log

Reclaimed 22GB and a dead box from one runaway log
Walked into a $5 box at 100% disk, nginx down, site 502. Culprit: a debug log nobody rotated, 22GB single file.
— truncate -s 0 /var/www/site/debug.log (don't rm an open file, the space won't free)
— added logrotate: size 100M, rotate 5, compress, copytruncate
Disk dropped from 100% to 38% instantly, nginx restarted clean. The copytruncate bit matters: it rotates without needing the app to reopen the handle. Set this before it bites you, not after.
Try it tonight.
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.