title: pm2 restarts again and again
body: <p>I have my NodeJs server hosted on DigitalOcean.The server worked well for few days after which it stopped due to pm2 starting again and again.</p>
  
  <p>This is a screenshot of my logs after starting it with pm2 start app.js
  <a href="https://i.stack.imgur.com/0ZK3M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ZK3M.png" alt="enter image description here"></a></p>
  
  <p>However, if I simply start my server using node app.js it works fine.</p>
  
  <p><a href="https://i.stack.imgur.com/SL7ep.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SL7ep.png" alt="enter image description here"></a></p>
  
  <p>My code for listening on server is
  <a href="https://i.stack.imgur.com/GydKH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GydKH.jpg" alt="enter image description here"></a></p>
  
  <p>I have not found any suitable answer for this problem.If more description to this problem is required then let me know.</p>