-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【eggjs】npm start 后,中间件中的代码一直被执行。 #3678
Comments
从代码上看不出问题,如果只是你在 linux 上有这个问题的话,建议打印下 ctx.url 以及抓包看看,是不是 linux 上有什么定时任务啥的。 |
@atian25 是新的空白的容器,只有一个supervisor守护进程的东东,定时任务怎么会执行到中间件里去了呢?不是只有请求进来的时候代码才会执行嘛? |
我指的是 linux 自身的 cron 啥的。 或者是 supervisor 之类会不会有监控检查之类的请求。你在你的中间件里面打印下 ctx 的 url, headers 等信息查下呗。 |
一直被执行是啥意思 |
@atian25 感谢猪哥, 找到问题啦,确实有个监控请求一直在访问我的服务,,,问下运维同学 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题复现
1、中间件代码
sharp_rotate.js
2、中间件配置
config.default.js
3、执行
npm start
本地mac OS环境正常
linux-64环境中间件代码一直被执行
最小可复现仓库
https://github.com/luckymore/middleware-test.git
相关环境信息
The text was updated successfully, but these errors were encountered: