-
Notifications
You must be signed in to change notification settings - Fork 597
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
Timeout when opening a new channel after channel exception #1246
Comments
cc @pabermod I think what you're doing in your code is not allowed. First of all, in #1245, you state this -
...but your code has these lines which disable connection recovery and topology recovery:
At any rate, my guess is that creating a new I'm updating my code with a better method. |
Creating a model from within a callback is highly unusual. Usually consumer operation dispatch implementations do not expect that. Java client, for example, had to be changed so that such synchronous methods (in protocol terms, that is, a method requiring a response) can be used from consumer callbacks without blocking the I/O loop. |
@pabermod please see my commit which shows one way to respond to |
Hi, i think i disabled autorecovery for testing. The timeout is thrown both when disabled and enabled. I will take a look at your code |
Hi, Your test projects is throwing an exception in a loop when trying to declare the exchange after the channel is shutdown. I have moved the creation of the channel to the beginning of the loop (if channel shutdown). It is still throwing an exception when it tries to create the channel after the channel is shutdown (Both autorecover enabled and disabled):
|
How are you running the test program and RabbitMQ? I am running everything on Windows 10 pro. RabbitMQ 3.10.7, Erlang 25.0.4. Here is the output from running the code as is:
This is what RabbitMQ logs:
Here's how I created the large file using Powershell:
|
I see the same behavior on Linux:
It'll be interesting to see what's different in your environment. |
With your example file it is working, but with a bigger file is raising the excepion i mentioned. For example with a file if 708.199.808 bytes In RabbitMQ log i can see:
|
This is what you originally indicated is not working in your environment, but now you show a heartbeat timeout. Which is it?
Where did you indicate that you adjusted the heartbeat settings? The default should be 30 (or 60 seconds) I believe. RabbitMQ is not designed for huge file uploads. Compress the data, or split it up. At this point the example code I provide appears to show how to correctly open a new channel when a channel exception happens and auto recovery is disabled. If you wish to continue, start a new discussion and provide complete information (code and reproduction steps). |
Heartbeat timeouts for messaging client connections are entirely orthogonal to HTTP API or CLI tool operations on definitions. |
Code to reproduce issue - https://github.com/lukebakken/rabbitmq-dotnet-client-1245
Discussed in #1245
Originally posted by pabermod September 1, 2022
Hi, I have the following scenario:
I have a handler for that event that opens a new channel for the same connection. When openning the new channel I get the following error:
I attach .Net project example for the problem that uses:
The example sends the content of the given file. Will close the channel is size is bigger than 134217728 bytes:
RabbitMQError.zip
The text was updated successfully, but these errors were encountered: