It’s an error that occurs while setting up a new server app
PM2 is set as below
module.exports = {
name: "{domain}",
script: "uvicorn main:app --port 9623",
args: "",
log_type: "json",
cwd: "/home/esmaster/{domain}/current",
interpreter : "/usr/bin/python3",
// 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.
// 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": 9623,
"CI": 1,
"NUXT_TELEMETRY_DISABLED": 1
}
}
An encoding error occurs.
Does the same setting work in my local area
When I go up to the server, the following error message occurs
SyntaxError: Non-UTF-8 code starting with '\\x82' in file /usr/bin/bash on line 2, but no encoding declared; see https://python.org/dev/peps/pep-0263/ for details\n
I’m asking if there’s any way
If you run it with the message below, it works normally
pm2 start "python3 -m uvicorn main:app" --name {domain}