node-hapi 代码部署在 aws 实例micro t2上 - 大摇大摆的响应在一段时间后变为空

问题描述

我遇到的问题是,在启动 pm2 模块 24 小时后,API statusCode 显示 200 消息显示 success 但是 data 参数会在预期对象的地方给出 null

重启pm2后就可以了

问题是我现在每天都需要早起重启pm2模块。

以下是p2模块生态系统.config文件代码

module.exports = {
    apps : [{
        name: 'WooHoo',script: 'server.js',// Options reference: https://pm2.io/doc/en/runtime/reference/ecosystem-file/
        args: 'one two',instances: 1,autorestart: true,watch: true,max_memory_restart: '4G',env: {
            NODE_ENV: 'production'
        }
    }],deploy : {
        production : {
        user : 'node',host : '3.143.71.160',ref : 'origin/staging',repo : 'git@github.com:repo.git',path : '/var/www/production','post-deploy' : 'npm install && pm2 reload ecosystem.config.js --env production'
        }
    }
};

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)