Что недостатки к использованию mod_log_rotate и rotatelogs.exe вместе?

Купите четвертый диск, RAID 10 их. Я знаю, что это не то, что Вы хотите услышать, но это - правильный ответ.

4
задан 24 February 2014 в 21:23
1 ответ

rotatelogs and mod_log_rotate are two different solutions to the same problem (Rotating logs without having to signal or restart Apache).

rotatelogs (or other programs like cronolog) solves the problem by piping the Apache log to a program which handles the rotation. This is a fine solution, though it means running another process and keeping pipes open.

mod_log_rotate solves the problem by handling the rotation in the server process. Again, also a fine solution, but it only rotates the access logs (which leaves you needing to do something else for the error log).

There's nothing "wrong" with using both solutions (one to handle your access log, one to handle your error log), but for the sake of sanity and consistency I would stick to one solution - either signaling Apache when you rotate logs, or piping everything to rotatelogs.


In particular on Windows, I would suggest rotating your logs externally and signaling Apache, because piping stuff around on Windows can be buggy (and to my knowledge the situation hasn't improved much since 2006).

(Actually were I making a recommendation I would recommend not running Apache on Windows -- Apache is designed to run on Unix servers, IIS is designed to run on Windows servers, and never should the two cross despite what the Apache people might claim about "supporting" Windows.)

3
ответ дан 3 December 2019 в 03:43

Теги

Похожие вопросы