Hey I have a nightmare js project that works on my Mac flawlessly but I’m having an issue on the server that it only runs once and then it seems to be not responding at all anymore. I tried many things from the related GitHub issue using Xvfb and it is starting and working on the first try but not after that, I have to restart it to make it work again. I was able to find this error message in the pm2 logs of the Xvfb instance but it does not help me much:
(EE) (EE) Fatal server error: (EE) Server is already active for display 99 If this server is no longer running, remove /tmp/.X99-lock and start again.
What I am getting from this that the screen is live but it cannot use it. to start to projects I am running a file that has these contents
{
"apps" : [{
"name" : "index",
"script" : "index.js",
"env": {
"DISPLAY": ":99"
}
},
{
"name" : "Xvfb",
"interpreter" : "none",
"script" : "Xvfb",
"args" : ":99"
}]
}
and i run this with the pm2 start filename command and then i have 2 pm2 processes running.