Skip to content
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

Add “server_timeout” parameter for detect server-side timeout. #270

Closed
wants to merge 2 commits into from
Closed

Conversation

Louis-Ni
Copy link
Contributor

增加server_timeout 的参数设置, 三个函数,主要为了检测是否有开启服务端超时, 如果超时直接抛出异常.

louisni and others added 2 commits June 22, 2020 19:18
增加server_timeout 的参数设置, 三个函数,主要为了检测是否有开启服务端超时, 如果超时直接抛出异常.
@tai1030
Copy link

tai1030 commented Jun 23, 2020

我正在开发的项目也有这个需要。
要是只依赖Nginx代理实现客户端的超时中断连接,服务端未能即时中断正在运行的请求。

假设现在打开了一个MySQL transaction 事务,然后在执行rollback或commit前进入了死循环,那么在另一请求发起的transaction中进行DML时,会发生deadlock死锁。

只要实现服务端的超时控制,再利用中间件或cleaner在抛出超时异常后,rollback所有由该请求打开的transaction,问题就能解决了。

https://my.oschina.net/u/222608/blog/1923730

@hhxsv5 求审查一下,謝。

#161

@hhxsv5
Copy link
Owner

hhxsv5 commented Jun 29, 2020

感谢各位的支持,超时控制这个需求其实我很早就提给Swoole了 #59,如果Swoole官方能支持就最好了,先等待官方回复。

@hhxsv5 hhxsv5 added the enhancement New feature or request label Jul 1, 2020
@hhxsv5 hhxsv5 deleted the branch hhxsv5:master April 22, 2024 16:44
@hhxsv5 hhxsv5 closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants