0

I just got my first LAMP up and running, everything works fine except that my server is restarting itself every sunday.

When I read the logs I see "Graceful restart requested, doing restart"

Should I just let my server do this or should I stop it?

It seems that some settings get lost in this process, Eg: sudo chown -R name:name /var/logs/

after this restart I dont have the permission and then I have to run

sudo chown -R name:name /var/logs/ again in order to get it back.

Here are some logs if it would help:

[Sun Sep 15 07:35:02 2013] [notice] Graceful restart requested, doing restart

127.0.0.1 - - [15/Sep/2013:07:35:02 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Ubuntu) (internal dummy connection)"

[Sun Sep 15 07:35:03 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.17-5+debphp.org~precise+1 configured -- resuming normal operations

Could piped logs help?

I still testing my application so I do have alot of errors.

The "/etc/logrotate.d" says:

/var/log/apache2/*.log {
    weekly
    missingok
    rotate 52
    compress
    delaycompress
    notifempty
    create 640 root adm
    sharedscripts
    postrotate
        /etc/init.d/apache2 reload > /dev/null
    endscript
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
    endscript
}
lukas
  • 1
  • 1

1 Answers1

0

Have you checked your logrotation (ex. /etc/logrotate.d/apache2) there could be a postrotate for your daemon.

deagh
  • 2,019
  • 5
  • 19
  • 19
  • Thanks, this is what it says: /var/log/apache2/*.log { weekly missingok rotate 52 compress delaycompress notifempty create 640 root adm sharedscripts postrotate /etc/init.d/apache2 reload > /dev/null endscript prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript } – lukas Sep 18 '13 at 22:10