Closed nlove518 closed 6 years ago
在中间件捕获异常后,怎么通过代码重启egg服务?启动egg服务的代码怎么写?
捕获异常后为啥要重启?
@atian25 因为之前遇到timeout的问题 重启之后服务才能恢复正常。 所以想通过捕获timeout 错误,让服务重启。
关键还是那个问题,为啥 timeout 了,看那边的 issue,貌似官方也没法复现?
想重启就 process.exit() 杀掉自己。
process.exit()
在中间件捕获异常后,怎么通过代码重启egg服务?启动egg服务的代码怎么写?