title: Nginx process is dead. why and where to look?
body: <p>recently the nginx on my server goes down after some time about 2 times a day and does not exist or show up in processes. </p>
  
  <p>I checked the nginx error file and found nothing special. just sometimes it gets "connection refused while connecting to upstream" which is <strong>ok</strong>.(it is because I took down an app and it does not answer nginx )
  the access logs are ok too. nothing odd in access logs. </p>
  
  <p>I checked the <code>systemctl nginx status</code> and it gives me this: 
  <a href="https://i.stack.imgur.com/jDPhI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jDPhI.jpg" alt="systemctl nginx status result"></a></p>
  
  <p>which does not provide any info about why nginx is down. it just says nginx is inactive (dead) which i know it myself. also it says that ExecStop has failed. this line appears when nginx is running successfully so i dont think it is important.</p>
  
  <p>i checked kern.log and no out of memory situation appeared to kill nginx. (i have more than enough memory for my apps and nginx and other stuff)</p>
  
  <p>so why my nginx goes down?
  where else should I look for possible problems?</p>