Every time I restart nodebb, the site will down for about 3 minutes. At first I doubted that the nodebb may have some thing to initialize.
Then I found that even if if restart nginx(not reload), this issue may also occur.
During this 3 minutes, the mongodb and 3 node process eat 100% CPU and most of the memory. The 3 minutes depends on the machine, 2core-4G machine will take 3 minutes and 4core-8G machine will take 1 minutes.
Unless specified otherwise, nginx root dir is /usr/share/nginx/html
Nodebb nginx configuration docs utilize this when describing setting up a custom error page.
Nginx is being used exclusively as reverse proxy and not serving any additional sites. I think I read somewhere that under such configuration an explicit default server docroot should not be specified? But even in such cases I think the hard coded default /usr/share/nginx/html still serves up 50x.html error page.
In absence of a custom error page, nodebb uses nodebb/public/503.html?
Soo... now my question... taking all of above into consideration.. what is proper/correct best practice configuration for a "scaled" nginx nodebb deployment? I know what "could" work. I am curious what "should" be recommended best practice.
(Yeah, I know I already posted this in a different thread but it was a mistake at the time not to have started a new thread because this is pretty specific w.r.t. best practices configuration rather than "why isn't my stuff isn't working" question. Apologies for that.)