Comments (10)
@changwuf31 When it's merged spiral-modules/roadrunner-binary#11 you will have the ability to configure the grace period in seconds, minutes, and hours. Additionally, like in the Kubernetes, when you sent SIGINT
or SIGTERM
to the RR2 it will activate the grace period and let RR2 finish gracefully. During the graceful shutdown, if RR2 receive a second signal, it will be forcibly closed with a non-zero error code.
from roadrunner-temporal.
Yes, it does. The plugin will attempt to complete in-flight activities before shutting down. However, under load, some workflow tasks might miss the worker, which is fine since the server will handle it properly.
from roadrunner-temporal.
Graceful shutdown use similar behavior as hot reload command rr reset
.
from roadrunner-temporal.
so, does that mean, we can use this on kubernetes:
lifecycle:
preStop:
exec:
command: [
# Gracefully shutdown roadrunner temporal
"rr", "reset"
]
from roadrunner-temporal.
You can send SIGTERM or SIGINT to RR to ask for the shutdown. Reset will recreate the worker pool. If this is not convenient we can expose the "stop" command.
from roadrunner-temporal.
On nginx case
# SIGTERM triggers a quick exit; gracefully terminate instead
command: ["/usr/sbin/nginx","-s","quit"]
Ref: https://ubuntu.com/blog/avoiding-dropped-connections-in-nginx-containers-with-stopsignal-sigquit
If SIGTERM on roadrunner is a graceful terminate, then there is no need for a "stop" command,
Does sending SIGTERM to roadrunner, will make the temporal workers:
- stop asking for new jobs
- process the current running jobs
- and stop gracefully
?
Btw, Is there a local job queue ?
from roadrunner-temporal.
Hey @changwuf31 . Thanks for the question :)
- RR2 (via the Endure container) does not support the graceful shutdown at the moment. When you send
SIGTERM/SIGINT
signal to the RR2 it ask the container to start theStop
routine. Container topologically asks vertices (plugins) to Stop. If some vertex did not respond during the configurable (10s by default) time,Endure
will show the message with such vertices and exit from the root RR2 process which will lead to an exit from all child processes. - It will be easy to implement, but could you please file us a ticket to the main RR2 repository https://github.com/spiral/roadrunner/issues ?
from roadrunner-temporal.
ref: roadrunner-server/roadrunner#555
from roadrunner-temporal.
1. RR2 (via the [Endure](https://github.com/spiral/endure) container) does not support the graceful shutdown at the moment. When you send `SIGTERM/SIGINT` signal to the RR2 it ask the container to start the `Stop` routine. Container topologically asks vertices (plugins) to Stop. If some vertex did not respond during the configurable (10s by default) time, `Endure` will show the message with such vertices and exit from the root RR2 process which will lead to an exit from all child processes.
If so, is it correct if I say, we just need to call endure.SetStopTimeOut(600 * time.Second)
on roadrunner-binary ?
from roadrunner-temporal.
@changwuf31 Yep, but we will provide graceful shutdown
later as well.
from roadrunner-temporal.
Related Issues (20)
- [🐛 BUG]: Metric `temporal_activity_schedule_to_start_latency` useless with RR? HOT 14
- [🐛 BUG?]: MaxConcurrentActivityExecutionSize ignored. HOT 6
- [💡 FEATURE REQUEST]: Support LocalActivities
- [🐛 BUG]: Incorrect worker pool recreating HOT 38
- github.com/stretchr/testify-v1.7.2: 1 vulnerabilities (highest severity is: 7.5) - autoclosed HOT 1
- [💡 CHORE]: Move all protos to the buf RR API
- [💡 FEATURE REQUEST]: Overwrite `client-name` and `client-version` in Go client to represent PHP-SDK HOT 3
- [💡 FEATURE REQUEST]: Statsd support for metrics HOT 3
- github.com/uber-go/tally/v4-v4.1.2: 2 vulnerabilities (highest severity is: 7.5) - autoclosed HOT 1
- [🐛 BUG]: Worker after SIGTERM not wait for finish activity HOT 4
- [💡 FEATURE REQUEST]: Support FailureConverter API HOT 2
- github.com/uber-go/tally/v4-v4.1.3: 2 vulnerabilities (highest severity is: 7.5) - autoclosed HOT 1
- github.com/uber-go/tally/v4-v4.1.4: 2 vulnerabilities (highest severity is: 7.5)
- github.com/uber-go/tally/v4-v4.1.5: 2 vulnerabilities (highest severity is: 7.5)
- github.com/uber-go/tally/v4-v4.1.6: 2 vulnerabilities (highest severity is: 7.5)
- [🐛 BUG]: broken load balancing for workflow worker HOT 12
- [🐛 BUG]: Can't cancel workflow from activity - UnhandledCommand for activity, but workflow is completed HOT 7
- github.com/uber-go/tally/v4-v4.1.7: 2 vulnerabilities (highest severity is: 7.5)
- proto_codec_parse_message: invalid character '6' looking for beginning of value HOT 2
- invalid character '1' looking for beginning of value", HOT 3
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 roadrunner-temporal.