Skip to content

Multiruntime pool warning (revert #387)#389

Open
davidrjonas wants to merge 2 commits intoblackbeam:masterfrom
davidrjonas:multiruntime-pool-warning
Open

Multiruntime pool warning (revert #387)#389
davidrjonas wants to merge 2 commits intoblackbeam:masterfrom
davidrjonas:multiruntime-pool-warning

Conversation

@davidrjonas
Copy link
Copy Markdown

I must apologize for my premature PR (#387). It was incorrect.

Although it fixed the "Pool was disconnected" problem, some connections still got the "A Tokio 1.x context was found, but it is being shutdown." Further debugging found that the I/O driver for the TcpStream stays with the runtime where the connection was started. And there doesn't seem to be any way around that. I don't think Pool is safe to share in a multi-runtime environment like actix-web. One Pool per worker works great, though it's more work to collect metrics.

I've reverted my previous commit and added a short section to the Pool documentation that warns about the situation.

Thanks for your patience!

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