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

System.NotSupportedException. Pipelining of requests forbidden after timeout #1368

Open
pabermod opened this issue Aug 9, 2023 · 5 comments
Assignees
Labels
next-gen-todo If a rewrite happens, address this issue.
Milestone

Comments

@pabermod
Copy link

pabermod commented Aug 9, 2023

Describe the bug

Hi,

If a timeout is produced when trying to declare a queue using the method QueueDeclare, following attempts to define a queue using the same IModel will produce a System.NotSupportedException. Pipelining of requests forbidden after timeout error.

Also if I try to dispose a IConnection that was unexpectedly closed, the Dispose method seems to never return.

To simulate timeout I use the windows application clumsy version 0.3 with the following configuration
image

I attach an example client:
RabbitMQTimeout.zip

Reproduction steps

  1. Start rabbitmq in a docker env: docker run --hostname my-rabbit --name some-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management
  2. Open clumsy and configurate as indicated
  3. Start the attached project
  4. When the message "Channel MyChannel9 opened in connection 'MyClient'" is printed, start clumsy
  5. A timeout exception will appear when trying to create one of the queues
  6. Following exceptions will be System.NotSupportedException. Pipelining of requests forbidden
  7. Also after a while the connection will be unexpectedly closed with message: 541 - Unexpected Exception

Expected behavior

After the first timeout the channel should be created if there are no more connectivity problems. Otherwise it should generate again a Timeout exception.

Also the IConnection should be able to be manually disposed after an unexpected error. The line 232 of class RabbitMQCore is never executed.

Additional context

No response

@pabermod pabermod added the bug label Aug 9, 2023
@michaelklishin michaelklishin removed the bug label Aug 9, 2023
@michaelklishin
Copy link
Member

It's not clear from your description whether the client actually hits an operation timeout or not. Because if it does not, then the exception is correct: this client does not support pipelining of methods for which the server will send a response.

@pabermod
Copy link
Author

pabermod commented Aug 9, 2023

Hi,

Yes, the client will get a timeout when trying to create a queue. After that it will get a Pipelining of requests forbidden after timeout exception. each time I try to create a queue using that channel.

If I stop clumsy while getting the exceptions "Pipelining of requests forbidden" it will finally create the queue.

So for me is an strange error that cannot be understad by the user.

From the error message i would understand that after a timeout I cannot use the channel anymore. But if the network problem disappears it can create finally the queue using that same Channel, so i'm seeing some kind of inconsistency.

@lukebakken lukebakken self-assigned this Nov 18, 2023
@lukebakken lukebakken added this to the 7.0.0 milestone Nov 18, 2023
@lukebakken
Copy link
Contributor

@pabermod I added your code here - https://github.com/lukebakken/rabbitmq-dotnet-client-1368

I can reproduce this issue using more aggressive settings in Clumsy. I'm investigating.

@lukebakken lukebakken modified the milestones: 7.0.0, 6.9.0 Dec 28, 2023
@lukebakken
Copy link
Contributor

Yes, the client will get a timeout when trying to create a queue

Any exception on a channel essentially means that IModel / IChannel instance is no longer valid and should be disposed.

In this specific case, I can see some improvements to be made:

I don't think this issue should be addressed in the 6.x series of this library, which is why I moved it to the 7.0.0 milestone

@lukebakken
Copy link
Contributor

#402 is this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-gen-todo If a rewrite happens, address this issue.
Projects
None yet
Development

No branches or pull requests

3 participants