Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to migrate this for a newer pm2 version? #1059

Closed
binarykitchen opened this issue Mar 2, 2015 · 4 comments
Closed

How to migrate this for a newer pm2 version? #1059

binarykitchen opened this issue Mar 2, 2015 · 4 comments

Comments

@binarykitchen
Copy link
Contributor

This one config

[{
    "name":         "staging.videomail.io",
    "cwd":          "/var/www/videomail/staging/source/",
    "script":       "src/server.js",
    "error_file":   "/var/log/nodejs/videomail/staging/error.log",
    "out_file":     "/var/log/nodejs/videomail/staging/out.log",
    "instances":    "1",
    "merge_logs":   "true",
    "exec_mode":    "fork_mode",
    "port":         4442,
    "env": {
        "NODE_ENV": "staging"
    }
}]

does not go well with your latest version. Seeing these warnings here:

$  pm2 startOrRestart ./etc/pm2/staging.json && pm2 save
[PM2] [WARN] You are starting 1 processes in fork_mode without load balancing (beta). To enable it remove -x option.
[PM2] [WARN] Expect "merge_logs" to be a typeof [object Boolean], but now is [object String]

What changes are needed to migrate the above? Not very clear to me. Thanks for helping!

@Tjatse
Copy link
Collaborator

Tjatse commented Mar 2, 2015

[{
    "name":         "staging.videomail.io",
    "cwd":          "/var/www/videomail/staging/source/",
    "script":       "src/server.js",
    "error_file":   "/var/log/nodejs/videomail/staging/error.log",
    "out_file":     "/var/log/nodejs/videomail/staging/out.log",
    "instances":    1,
    "merge_logs":   true,
    "exec_mode":    "fork_mode",
    "port":         4442,
    "env": {
        "NODE_ENV": "staging"
    }
}]

@binarykitchen
Copy link
Contributor Author

Thanks @Tjatse but no backward compatibility when merge_logs is a string of true?

And what about the other warning [PM2] [WARN] You are starting 1 processes in fork_mode without load balancing (beta). To enable it remove -x option. ?

@Tjatse
Copy link
Collaborator

Tjatse commented Mar 2, 2015

@binarykitchen You're welcome.

    1. Yup, no backward compatibility. It's a breaking change ^^!
    1. Never mind the warning, it means no necessary to specify instances when setting "exec_mode":"fork_mode".

@binarykitchen
Copy link
Contributor Author

I see, all good now. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants