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

Changing rabbit connection timeout #1181

Merged
merged 6 commits into from
Oct 5, 2023

Conversation

dtuantran
Copy link
Collaborator

@dtuantran dtuantran commented Oct 4, 2023

@Didayolo
...

Changing the default worker connection timeout of RabbitMQ

Since the version 3.8, RabbitMQ added consumer_timeout as 1800 s by default. It means that if the compute worker doesn't answer RabbitMQ server after 30 minutes, RabbitMQ closes the connection. Therefore, if we have a submission running for more than 30 minutes, RabbitMQ suggests that the compute worker disappeared and distributes this submission to another compute worker. It ends up with all compute worker having submission running and blocking.

Issues this PR resolves

Render this parameter as environment variable and fix it to 100000000 milliseconds, more 27h.

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo
Copy link
Collaborator

Didayolo commented Oct 4, 2023

Hi @dtuantran,

I know we basically have this as local changes in the production server, but without the new timeout argument in the .env, and the code looks good to me.

How can this be tested? Have you tested it? What is required when deploying this in production?

@dtuantran
Copy link
Collaborator Author

Hi @dtuantran,

I know we basically have this as local changes in the production server, but without the new timeout argument in the .env, and the code looks good to me.

How can this be tested? Have you tested it? What is required when deploying this in production?

Yes, I tested on my local instance. RabbitMQ has new timeout value when starting. Here is the step to verify:

Connect to the rabbit container

docker compose exec rabbit bash

Execute this command

rabbitmqctl eval 'application:get_env(rabbit, consumer_timeout).'

The result should be as we configure in .env

@Didayolo Didayolo merged commit 54bd3a1 into develop Oct 5, 2023
1 check passed
@Didayolo Didayolo deleted the changing-rabbit-connection-timeout branch October 5, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants