pm2 --watch下上传文件踩坑

使用PM2在CentOS上部署项目时,特定命令行参数导致上传图片接口返回502错误,移除watch参数后问题解决。记录MongoDB认证变更及PM2配置注意事项。

pm2部署在centos上,原本使用的是

pm2 start ecosystem.config.js --only prod-server --watch

会报错如下,Db.prototype.authenticate method will no longer be available in the next major release 3.x as MongoDB 3.6 will only allow auth against users in the admin db and will no longer allow multiple credentials on a socket. Please authenticate using MongoClient.connect with auth credentials

其他接口完全ok,唯独上传图片报502错误,去除watch就ok了

暂作记录.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值