title: pm2 keep auto restarting on image upload
body: <p>I am very close to release and while I was testing, I realized my api restarts on image upload, giving me 502 error.</p>
  <p>I realized pm2 was restarting on image upload endpoint - since it is not logging any error on api side, it must have been server itself.</p>
  <p>while investigating, I realized i had watch option to be true, so I set it to false and expecting all things to work again.</p>
  <pre><code>  &quot;apps&quot;: [
      {
        &quot;name&quot;: &quot;app&quot;,
        &quot;script&quot;: &quot;src/index.js&quot;,
        &quot;instances&quot;: 1,
        &quot;autorestart&quot;: true,
        &quot;watch&quot;: false,
        &quot;time&quot;: true,
        &quot;env&quot;: {
          &quot;NODE_ENV&quot;: &quot;production&quot;
        }
      }
    ]
  }
  </code></pre>
  <p>this is my ecosystem.config.json and my pm2 command is pm2 start ecosystem.config.json --no-daemon</p>
  <p>well, pm2 still restarting on every image upload endpoint, giving me same error 502.</p>
  <p>I am not physically storing images on my server, i simply save images to s3 buckets.. so image upload file change must be some kind of temp file... can anyone guide me to the right direction?</p>
  <p>Thank you.</p>
  <p>edit:</p>
  <p>Just figured out this silent crash only happens in docker container.. feature works fine when server was ran locally. Still trying to debug it. Also could possibly be sharp image resizing crashing... unsure..</p>
  <p>tried sharp.concurrency(1); sharp.cache(false); and setting UV_THREADPOOL_SIZE=1 but no luck</p>