Root Access Daily
Root Access Daily
@RootAccessDaily

Stop logs from filling your disk at 3am

Stop logs from filling your disk at 3am
A runaway access.log filled a 25GB disk and took down 12 sites. Never again:
— Custom rule in /etc/logrotate.d/mysites pointing at /var/www/*/logs/*.log
— daily, rotate 7, compress, delaycompress, missingok, notifempty
— Critical: copytruncate if the app holds the file open, OR a postrotate nginx reload
— Force a dry run to test: logrotate -d /etc/logrotate.d/mysites
— Add a disk alarm too: cron that emails if df hits 85%
The disk-full outage is 100% preventable. Try it tonight.
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.
tech

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

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

start

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

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

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