0
我試圖用集羣中的Azure中的WebApp服務,但我得到了錯誤錯誤:寫ENOTSUP在Azure上
Error: write ENOTSUP
低於源是由web.config文件執行我附上我的源。
const cluster = require('cluster');
const os = require('os');
if (cluster.isMaster) {
const cpus = os.cpus().length;
console.log(`Forking for ${cpus} CPUs`);
for (let i = 0; i < cpus; i++)
cluster.fork();
cluster.on('exit', (worker, code, signal) => {
if (code !== '0' && !worker.exitedAfterDisconnect) {
console.log(`Worker ${worker.id} crashed. Starting a new worker...`);
cluster.fork();
}
});
process.on('SIGUSR2',() => {
const workers = Object.values(cluster.workers);
const restartWorker = (workerIndex) => {
const worker = workers[workerIndex];
if (!worker)
return;
worker.on('exit',() => {
if (!worker.exitedAfterDisconnect)
return;
console.log(`Exited process ${worker.process.pid}`);
cluster.fork().on('listening',() => {
restartWorker(workerIndex + 1);
});
});
worker.disconnect();
};
restartWorker(0);
});
} else {
require('./bin/www');
}
Azure是否支持WebApps集羣? 如果不是有什麼選擇?
謝謝,邁克爾。