Comments (5)
Okay, but when i add Timer in my server, it cant be stopped gracefully. It delays deployments etc. Can this be fixed on your side? Can you guys add logic to kill every timer when SIGTERM received?
from swoole-src.
I thought i can register some event/signal handler, and then call Timer::clearAll(), but i had no success.
Tried Process\signal:
\Swoole\Process::signal(SIGTERM, function () {
var_dump('sigterm!');
Timer::clearAll();
});
received this warning:
Warning: Swoole\Process::signal(): signal [15] processor has been registered by the system in /app.php on line 18
... and callback is never executed
$server->on('shutdown')
is not triggered in my case too.
from swoole-src.
In Swoole\Server, it is not possible to set certain signal listeners, such as SIGTERM
and SIGALAM
.
from swoole-src.
@zip-fa You should listen to the workerExit
event and perform cleanup in this event callback
$serv = new Swoole\Server("0.0.0.0", 9501);
$serv->on('WorkerExit', function ($serv, $workerId){
$this->cleanup();
});
$serv->start();
from swoole-src.
This doesn't resolve my issue, since i have specific code and workerExit is not suitable.
Even if i move my code, Timer::tick() issue will not be resolved. Can this be reopened? @matyhtf
from swoole-src.
Related Issues (20)
- PHP 8.3 - Segmentation fault (core dumped) while running composer HOT 2
- WARNING check_worker_exit_status: worker#2[pid=104] abnormal exit, status=0, signal=11 HOT 1
- swoole报错sendto to reactor failed, Error; No buffer space available[105) HOT 1
- dispatch_func always results in recursion in 5.1.1 / 8.3 HOT 4
- 协程风格的TCP服务器问题,如何顺序处理事件 HOT 2
- coredump Assertion 'iov[i].iov_len > 0' failed php v8.0.8 Swoole 4.6.7 server shutdown HOT 1
- swoole 和 composer 冲突 HOT 1
- Cookie is truncated leading to a malformed/invalid cookie
- errno changes after wait_process, and causes incorrect WARNING messages HOT 1
- 优化下调试体验,xdebug下碰上io操作请不要直接切换协程 HOT 1
- Swoole\Table::set(): failed to set('36998'), unable to allocate memory HOT 4
- Uncaught Swoole\Error: cURL is executing, cannot be operated in HOT 8
- swoole 4.8-5.0版本使用redis异常 HOT 5
- Swoole CURL Flag causes SEGFAULT on PHP8.3 HOT 2
- Compile and install Swoole 5.1.1, run the make test command and output a large number of errors HOT 1
- abnormal exit HOT 3
- curl协程化无法通过curl_getinfo获取tcp连接时长等数据 HOT 4
- 编译报错 HOT 2
- 开启native curl后性能远不及未开启native curl HOT 2
- MySQL server fails connection at ./init of test HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swoole-src.