Express server deployment issue

I’m running a remix site on a custom server using cleavr. To get the site to run properly in cluster mode, I had to set up an express server for remix. This requires a couple customizations to the build settings. Here’s my build config:

module.exports = {
  name: "SITE_NAME",
  script: "./server.js",
  // args: "",
  log_type: "json",
  cwd: "/home/cleavr/SITE_NAME/current",
  // Note: We detected that this web app is running on a server with multiple CPUs and hence we are
  // setting *instances* to "max" and *exec_mode* to "cluster_mode" for better performance.

  watch: false,
  instances : "max", // change the value to "1" if your server has only 1 CPU
  exec_mode : "cluster_mode", // remove this line if your server has only 1 CPU
  env: {
    "PORT": 9718,
    "CI": 1,



This setup works great, but when I deploy a new version of my app, it looks like pm2 checks if there’s a change to the build config, and if there isn’t, it’s running an old version of the start command. This results in my server being unable to run in cluster mode.

In order to get it running properly, I have to make a small change (anything will do) to the build config so it registers that there’s a change and uses the appropriate start command.

Any ideas on how to fix this? Is there something wrong in my config or is there a setting I can toggle so that it always reads the current version of the build config?

Hello @sheffield ,

Sorry for the inconvenience caused.

It should have always used the current version of config file, we’ll investigate the matter and get back to you as soon as possible.

Thanks! I’ll continue to dig into it and will let you know if I come across anything.

Hello @sheffield,

If you are still having difficulty, could you please provide us with the site name where you are experiencing the issue?

it appears to be fixed now, but i’ll continue to monitor. thanks for the followup!