Replies: 1 comment 4 replies
-
Can you be sure it's caused by |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
比如说:
body_filetr阶段主要处理步骤
就是想要将步骤二进行异步处理,数据上传服务的这一个操作不影响客户端的响应
我起初的想法是在body_filter阶段创建一个线程,在线程中执行上报服务的操作,但是调用ngx.thread.spawn函数 发现
该阶段无法使用,然后我尝试使用ngx.timer.at(0,function) ,测试发现当function执行时间很长的时候,客户端发送第一次请求是正常的,第二次请求时,function执行还未结束,就会进行阻塞状态
这是我写的demo插件
Environment
apisix version
): 2.15.0Beta Was this translation helpful? Give feedback.
All reactions