Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a linux centos box with plesk on it.

Everyday during the apache_log gzipping process the apache server stops responding until the gzipping is over.

Is this normal behavior? Or is there a way to fix this?

UPDATE:
It turns out the freezing was caused by a mysql routine which coincided with the log rotation.

share|improve this question
    
There is a way dependent on the logrotating mechanism you use and what syslog daemon you use. Hint: the answer to my question is not "Plesk". –  mailq Aug 20 '11 at 11:31
    
This is just default centos settings. We haven't setup any special mechanisms. –  Haluk Aug 20 '11 at 11:40
add comment

1 Answer

Definitely NOT normal. Three things to check:

  1. Make sure the log rotation system doesn't try to compress tle log Apache is writing to. You can do this by setting the "DelayCompress" flag in logrotate's config file.
  2. Make sure your logrotate configuration has a postrotate command that makes Apache re-open its logfiles (graceful restart should be OK).
  3. In the (very unlikely) event that gzip is saturating your CPU, see if you can renice the gzip process (Not sure if logrotate supports that but you could hack it with a postrotate script)
share|improve this answer
    
I love your answer. But a Plesk user would say: "Huh? What do I have to click?" –  mailq Aug 20 '11 at 18:28
    
There's a command line - Also not all Plesk users grew up in a walled garden. If they know enough to use centos I hope they can use ssh :-D –  voretaq7 Aug 20 '11 at 19:03
    
Voretaq, Thank you for the detailed answer. At first I needed to switch off the logrotation mechanism by plesk. Then I found out how to configure the logrotate.conf and managed to configure them properly. However it turns out the freezing was caused by a mysql routine scheduled around the same time. I flagged this question for deletion. –  Haluk Aug 22 '11 at 12:16
    
@Haluk - glad you got it solved. I don't think we need to delete this question - we don't know if any of the answers reqlly work because it's a different problem, but they may be useful to someone later. –  voretaq7 Aug 22 '11 at 15:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.