title: What makes my node app restart every 30 seconds using pm2
body: <p>I'm still quite new to <em>pm2</em> and currently trying to get a node app running. This workes fine except the fact that the app gets restarted without any reason.</p>
  
  <p>The app runs fine without any crash on the development machine. The log files do not show any crash. (Already testet that the log files would log a crash.)</p>
  
  <p>Did I configure pm2 wrong?</p>
  
  <h3>ecosystem.json</h3>
  
  <pre><code>{
    "name"             : "app1",
    "cwd"              : "/home/pm2/apps/app1/prod",
    "script"           : "dist/main.js",
    "log_date_format"  : "YYYY-MM-DD HH:mm Z",
    "error_file"       : "/home/pm2/apps/app1/logs/stderr.log",
    "out_file"         : "/home/pm2/apps/app1/logs/stdout.log",
    "pid_file"         : "/home/pm2/apps/app1/pids/app1.pid",
    "instances"        : 1, //or 0 =&gt; 'max'
    "min_uptime"       : "200s", // 200 seconds, defaults to 1000
    "max_restarts"     : 10, // defaults to 15
    "max_memory_restart": "1M", // 1 megabytes, e.g.: "2G", "10M", "100K", 1024 the default unit is byte.
    "cron_restart"     : "1 0 * * *",
    "watch"            : false,
    "ignore_watch"     : "./logs",
    "exec_interpreter" : "node",
    "env": {
      "NODE_ENV": "production"
    }
  }
  </code></pre>
  
  <h3>logs/stdout.log</h3>
  
  <pre><code>2016-10-24 14:28 +02:00: server listening on port 3100
  2016-10-24 14:28 +02:00: server listening on port 3100
  2016-10-24 14:29 +02:00: server listening on port 3100
  2016-10-24 14:29 +02:00: server listening on port 3100
  2016-10-24 14:30 +02:00: server listening on port 3100
  2016-10-24 14:30 +02:00: server listening on port 3100
  </code></pre>
  
  <h3>logs/stderr.log</h3>
  
  <pre><code>//empty...
  </code></pre>