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

Handle multiprocessing with request sessions #2290

Merged
merged 5 commits into from
Dec 9, 2017

Conversation

jhorman
Copy link
Contributor

@jhorman jhorman commented Nov 18, 2017

When luigi forks with --workers it uses the same requests Session object leading to bugs.

Description

Session is not multiproc safe. It uses http keep alives, and re-using the session across procs can lead to weird multiplexing. This was the cause of my RPCErrors, from what I can tell.

RPCError: Received null response from remote scheduler

Motivation and Context

Relates to #2209

Have you tested this? If so, how?

I ran under load, 50 workers with and without the fix. With the fix I no longer get the RPCErrors

…ich is not safe. I believe this is the cause of the reported

```
RPCError: Received null response from remote scheduler
```
Copy link
Collaborator

@dlstadther dlstadther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems innocent to me. Can this be tested with unit tests?

@jhorman
Copy link
Contributor Author

jhorman commented Nov 21, 2017

Added a basic test @dlstadther

@Tarrasch
Copy link
Contributor

Tarrasch commented Dec 9, 2017

I've wanted to hunt down this bug for a long time! Thanks!

@Tarrasch Tarrasch merged commit dddf698 into spotify:master Dec 9, 2017
This was referenced Jun 29, 2022
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.

3 participants