-
Notifications
You must be signed in to change notification settings - Fork 27
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
reader closed during delivery tests #194
Comments
@h0jeZvgoxFepBQ2C what server version are you using? |
Version: 2.9.16 run via Docker desktop. Here is our config file: # Client port of 4222 on all interfaces
port: 4222
# HTTP monitoring port
monitor_port: 8222
debug: true
max_payload: 64MB
# This is for clustering multiple servers together.
cluster {
# It is recommended to set a cluster name
name: "my_cluster"
# Route connections to be received on any interface on port 6222
port: 6222
# Routes are protected, so need to use them with --routes flag
# e.g. --routes=nats-route://ruser:T0pS3cr3t@otherdockerhost:6222
authorization {
user: ruser
password: T0pS3cr3t
timeout: 2
}
# Routes are actively solicited and connected to from this server.
# This Docker image has none by default, but you can pass a
# flag to the nats-server docker image to create one to an existing server.
routes = []
}
websocket {
port: 4333
no_tls: true,
}
and here our docker-compose entry: nats:
image: nats
ports:
- "4222:4222"
- "4333:4333"
- "8222:8222"
volumes:
- ./cluster/dev/nats/nats.conf:/nats-server.conf |
go back to 2.9.15 - I think there's an issue on the server, need to investigate. |
Can you give me more info on what your code is doing, need a test to reproduce. |
Yep thanks, this was the issue. 2.9.15 works fine. Will give you some more code in some minutes. |
We are using the ruby gem for sending and a react app for receiving (code above): size = 4.kilobytes # or 400.kilobytes, which didn't work in 2.9.16
300.times do |i|
msg = { i: i, type: event, data: message}.to_json
nats = NATS.connect({
servers: ["nats://127.0.0.1:4222"],
connect_timeout: 30,
write_timeout: 30,
read_timeout: 30
})
nats.publish("test", msg)
nats.drain
end |
But with 2.9.15 everything works fine, thank you so much, also for the ultra fast response ❤️ ❤️ ❤️ |
Shall I leave this issue open until this gets fixed in the next version or shall I close it? |
@h0jeZvgoxFepBQ2C server group is looking at it |
This extends the previous work in #3733 with the following: 1. Remove buffer coalescing, as this could result in a race condition during the `writev` syscall in rare circumstances 2. Add a third buffer size, to ensure that we aren't allocating more than we need to without coalescing 3. Refactor buffer handling in the WebSocket code to reduce allocations and ensure owned buffers aren't incorrectly being pooled resulting in further race conditions Fixes nats-io/nats.ws#194. Signed-off-by: Neil Twigg <neil@nats.io>
Thank you so much ❤️ |
Right now we are testing nats.ws and it occured to us, that when getting flooded with bigger messages (300 messages x 400 kilobytes), following error happens:
This doesn't happen when we send the same content, just less characters.
After this error, the client is not receiving anymore.
Also the connection monitoring doesn't work, there is no disconnection event triggered, so the client also doesn't reconnect?
This is our code:
The text was updated successfully, but these errors were encountered: