Comments (5)
目前是在worker死了1.5倍心跳时间后,会被正在杀掉,在这期间不会接受新的请求,但是仍然会处理就的请求。
from pm.
worker心跳 heartbeat_interval
默认是 2000ms.
from pm.
你的worker代码的setTimeout是6秒后才end的。
from pm.
我的意思是,worker进程没有死掉,而是更新了代码后,主动reload相应的worker进程,但是杀死旧的worker进程时,必须让其处理完旧的请求,同时能启动新的worker进程来接收新的请求。
from pm.
@leizongmin 严谨地判断一个进程是不是在业务上“空闲”了pm
是做不到的,所以pm
在每个worker中留了一个简单粗暴的接口,允许开发者指定退出延迟。你可以通过指定 terminate_timeout
来改变这个延迟时间,默认1s:
https://github.com/aleafs/pm/blob/master/lib/worker.js#L84
from pm.
Related Issues (20)
- exception throw out for heartbeat when got sigterm
- need to fixed test case fails.
- worker is killed as soon as forked
- 能否支持worker在不同的机器上跑? HOT 6
- master crash with "uv__write: Assertion `fd_to_send >= 0' failed" HOT 4
- work直接监听模式 HOT 3
- 请问这个跟Node官方的Cluster之间有什么区别? HOT 4
- pm 怎么搭配 express来使用 HOT 1
- 我在 worker.js 里 console.log('ooxx'),在浏览器刷新页面会出现2~5条的ooxx,什么情况? HOT 13
- Support Cluster.Worker API HOT 4
- aaa HOT 2
- 你好,请教你几个问题哈 HOT 2
- 关于集成pm与kraken HOT 4
- 当我control+c 终止master进程的时候,报错 HOT 1
- 怎样杀死所有子进程? HOT 1
- PM监听端口有没有个数限制? HOT 1
- 你好,请教关于监听地址的问题 HOT 1
- 0 down time 更新问题
- windows环境下tcp_wrap报错,Linux环境未测试
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 pm.