Nginx restarting every 1 or 2 minutes - is this normal on debian 12 ?

Discussion in 'Installation/Configuration' started by webmaster-eddie, Nov 19, 2024.

Tags:
  1. webmaster-eddie

    webmaster-eddie New Member

    2024-11-19T12:18:05.908034+01:00 server1 systemd[1]: Stopping nginx.service - A high performance web server and a reverse proxy server...
    2024-11-19T12:18:05.929714+01:00 server1 systemd[1]: nginx.service: Deactivated successfully.
    2024-11-19T12:18:05.929918+01:00 server1 systemd[1]: Stopped nginx.service - A high performance web server and a reverse proxy server.
    2024-11-19T12:18:05.930294+01:00 server1 systemd[1]: nginx.service: Consumed 1.054s CPU time.
    2024-11-19T12:18:06.115633+01:00 server1 systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
    2024-11-19T12:18:06.278337+01:00 server1 systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.

    The above shows in system log: then 1 minute later, then 2 minutes later, then 1 minute later, then 2 minutes later, repeat. Is this planned behavior by ISPConfig3 on debian 12 bookworm - nginx from debian repos is 1.22.1 ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    No, and it's even likely that ISPConfig did not do this. ISPConfig reloads Nginx on a config change; normally it does not restart it. Plus, such a reload would only happen when you change a website's configuration. So you should know if you are changing website settings and applying them at the exact time point Nginx got restarted. if not, then this behaviour is not related to ISPConfig.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The behavior you describe looks to me as if you installed a monitoring software and configured it to restart services under certain circumstances like high CPU load or memory consumption. But, you have set the levels on when to restart the service too low in that monitoring application.
     
  4. remkoh

    remkoh Active Member HowtoForge Supporter

    Simple test to rule out ISPC is disabling it's cronjobs temporarily.
    For about 5 minuten should be sufficent and shouldn't be harmful.
     
  5. remkoh

    remkoh Active Member HowtoForge Supporter

    Monit for example could be doing this if it's installed.
     
  6. webmaster-eddie

    webmaster-eddie New Member

    Thanks for the idea about monit - I didn't even know it was installed. I ran a personalized Ispconfig autoinstaller so as to only have a web server with nginx and mariadb (and no dns no mail, etc) and must not have included the instruction to omit mmonit. When I looked at the monit nginx config, it had nginx listed as being in the group "nginx", however in the IspConfig admin interface, it is listed as being in the group www-data (which I believe is correct). I wonder if this was the problem? Changing the group of nginx to www-data in the monit config files did not stop the auto stop and start behavior. There was nothing wrong with the limits that I could see. I have had to disable monit to stop this behavior. Thanks.
     
    ahrasis and remkoh like this.
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    You should be able to see in the monit logs why it restarts nginx.
     

Share This Page