Comments (14)
Thanks for the recommendations
from roadrunner.
Hey @haydenm315 ๐ Thanks for the report ๐
I forgot to ask you about the RR version. Could you please try the latest one (2023.3.9)?
from roadrunner.
Just tried with 2023.3.10 and there's messages which indicate an attempt to recover, however I still don't see the queue listed when doing ./rr workers, after bouncing the rabbitmq service to simulate an upgrade or service interruption. Looks like there's an attempt to re-establish the connection now.
Upon making rabbitmq unavailable, roadrunner logs the following.
roadrunner-1 | {"level":"DEBUG","ts":"2024-02-07T18:14:21+0000","logger":"amqp ","msg":"delivery channel was closed, leaving the rabbit listener"}
roadrunner-1 | {"level":"DEBUG","ts":"2024-02-07T18:14:21+0000","logger":"amqp ","msg":"number of listeners","listeners":0}
roadrunner-1 | {"level":"DEBUG","ts":"2024-02-07T18:14:21+0000","logger":"amqp ","msg":"exited from redialer"}
roadrunner-1 | {"level":"ERROR","ts":"2024-02-07T18:14:21+0000","logger":"amqp ","msg":"amqp connection closed","error":"Exception (504) Reason: \"channel/connection is not open\""}
roadrunner-1 | {"level":"ERROR","ts":"2024-02-07T18:14:21+0000","logger":"amqp ","msg":"pipeline connection was closed, redialing","error":"Exception (320) Reason: \"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'\"","pipeline":"snapshot","driver":"amqp","start":"2024-02-07T18:14:21+0000"}
After making rabbitmq available again, roadrunner logs the following
roadrunner-1 | {"level":"INFO","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"rabbitmq dial was succeed. trying to redeclare queues and subscribers"}
roadrunner-1 | {"level":"INFO","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"queues and subscribers was redeclared successfully"}
roadrunner-1 | {"level":"INFO","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"connection was successfully restored","pipeline":"snapshot","driver":"amqp","start":"2024-02-07T18:14:21+0000","elapsed":"27.519989644s"}
roadrunner-1 | {"level":"INFO","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"redialer restarted"}
roadrunner-1 | {"level":"DEBUG","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"exited from redialer"}
roadrunner-1 | {"level":"ERROR","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"pipeline connection was closed, redialing","error":"Exception (320) Reason: \"CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'\"","pipeline":"snapshot","driver":"amqp","start":"2024-02-07T18:14:49+0000"}
roadrunner-1 | {"level":"INFO","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"rabbitmq dial was succeed. trying to redeclare queues and subscribers"}
roadrunner-1 | {"level":"INFO","ts":"2024-02-07T18:14:49+0000","logger":"amqp ","msg":"rabbitmq dial was succeed. trying to redeclare queues and subscribers"}
from roadrunner.
Yeah, so, that means that RR successfully redialed.
@haydenm315 Is that what you wanted to see, am I right?
from roadrunner.
Seems closer than the older release we were using. Still requires a restart of roadrunner to get it to accept jobs and have a ready status. Unless I restart roadrunner after rabbitmq comes back, I don't see jobs like below in the rr workers output.
Jobs of [jobs]:
+--------+----------+--------+---------+--------+---------+----------+
| STATUS | PIPELINE | DRIVER | QUEUE | ACTIVE | DELAYED | RESERVED |
+--------+----------+--------+---------+--------+---------+----------+
| READY | snapshot | amqp | default | 0 | 0 | 0 |
+--------+----------+--------+---------+--------+---------+----------+
Maybe something's not quite right with "trying to redeclare queues and subscribers".
from roadrunner.
I'm not sure, because I have a test especially for the case when rabbitmq is down. Have you tried to push the job after redial?
from roadrunner.
@haydenm315 In your configuration I also see, that you're consuming pipeline with the name widgets
, but you don't have such a pipeline in your pipelines configuration.
from roadrunner.
I renamed the queue in the previous example. It's not a queue naming issue. Jobs are getting pushed because when I restart the roadrunner server the number of Execs goes up.
from roadrunner.
But, it's not a queue, it's a pipeline. Could you please share the latest configuration you have?
from roadrunner.
Here the .rr.yaml file These are the env var values in the cfg file
AMQP_REDIAL_TIMEOUT=99999999
ROADRUNNER_NUM_POLLERS=200
ROADRUNNER_NUM_WORKERS=50
ROADRUNNER_PREFETCH=200
from roadrunner.
Thanks ๐
Few notes regarding your configuration:
- The number of
pollers
should not be significantly bigger than the number of workers. Poller is a thread inside RR which tries to obtain a job from the internal priority queue. More pollers -> more memory will be used for the thread stack, etc. Try 60pollers
and compare with the current value (200). - There is no
reload
plugin anymore since 2023.1.0 version.
from roadrunner.
Hey @haydenm315 ๐
I double-checked that behavior. Let me summarize what I did:
- Started RR, with jobs configuration and 1 pipeline.
- Shut down RabbitMQ docker. RR started the redial process with exponential backoff.
- I used a huge redial timeout. Waited for a minute.
- Then I started RabbitMQ docker.
- RoadRunner successfully reconnected to it.
Keep in mind, that RR uses an exponential backoff mechanism to redial. It won't reconnect immediately, but after some exponential step. For example: first redial will happen after 1sec after loosing a connection, next - 2s -> 5s -> 15s -> 25s ...
from roadrunner.
I also noticed, that your amqp
configuration contains some options from the other drivers, e.g.: reserve_timeout
is from the beanstalk
driver.
from roadrunner.
Closing as answered. You are welcome to comment here if you still have questions ๐
from roadrunner.
Related Issues (20)
- [๐ก FEATURE REQUEST]: HTTP log middleware separate configuration HOT 2
- [๐ BUG]: Region is missing from SQS endpoint URL when RR is running inside EC2 HOT 9
- [๐งน CHORE]: Rewrite multipart text values parsing algorithm
- [๐ BUG]: HTTP Queue gets too large HOT 16
- [๐ BUG]: Response status 200 instead of 500 in debug mode if php code fails HOT 4
- [๐ก FEATURE REQUEST]: Use Opentelemerty specific environment variables HOT 5
- [๐ก FEATURE REQUEST]: Log elapsed time always in microseconds HOT 9
- [๐ BUG]: RR cannot parse larger multipart form data HOT 6
- [๐ BUG]: unknown flag for long config options HOT 2
- [๐ BUG]: File uploads exceeding "upload_max_filesize" do not have the proper error code HOT 8
- [๐ก FEATURE REQUEST]: Temporal plugin healthcheck
- [๐ก FEATURE REQUEST]: `musl` arm64 binary `[blocked by GitHub ARM action runners]` HOT 4
- [๐ก FEATURE REQUEST]: RPC call to return all available storages HOT 4
- [๐ก FEATURE REQUEST]: Temporal: Provide some `sugar` for users to set the `Authorization` header
- [๐ BUG]: !BADKEY error on service name with dot (.) HOT 5
- [๐ก FEATURE REQUEST]: Including grpc error details in log messages
- [๐ BUG]: panic in http plugin HOT 5
- [๐ก FEATURE REQUEST]: Add support for streaming RPCs HOT 1
- [๐ BUG]: Incorrect name of the default AMQP exchange (should be 'amq.default') HOT 5
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.