Comments (10)
Thanks for the report! That looks like it could be an issue, and I think it is the source of a bug we had internally found recently, but hadn't investigated deeper.
I don't know if @derekcollison will have the bandwidth to look at it in the next day or two, but I'll work on getting a test together to confirm it and see. I'll follow up once I can confirm it.
from nats.go.
The readLoop is recycled on each reconnect, meaning the Go routine for an existing connection is torn down and a new one created. I will look into whether or not there is a race with the state of the connection and a new readLoop upon reconnect. Thanks.
from nats.go.
looking forward for your reply.
Date: Wed, 17 Sep 2014 06:31:14 -0700
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [nats] reconnet problem and fix (#29)
The readLoop is recycled on each reconnect, meaning the Go routine for an existing connection is torn down and a new one created. I will look into whether or not there is a race with the state of the connection and a new readLoop upon reconnect. Thanks.
¡ª
Reply to this email directly or view it on GitHub.
from nats.go.
How were you measuring the subsequent number of client connections? Looking at gnatsd or querying the clients themselves?
from nats.go.
Derekcollison,
First thanks for your reply. I have a 3 servers cluster. I use netstat -na | grep 4244
on each server to check how many clients connected to the server. Once I killed gnatsd I run the command to check which server got clients and plus all exist clients to check if any client is lost. After I killed and checked I start gnatsd on the server again, and I killed another server like previous.
from nats.go.
How long do you wait to restart the gnatsd server?
So to clarify, during this test you will see less clients successfully
reconnect to the server? Are all clients running in the same program? Is it
20 clients? Are they all Go based?
On Tue, Oct 7, 2014 at 6:17 AM, qinguoan [email protected] wrote:
Derekcollison,
First thanks for your reply. I have a 3 servers cluster. I use netstat
-na | grep 4244 on each server to check how many clients connected to the
server. Once I killed gnatsd I run the command to check which server got
clients and plus all exist clients to check if any client is lost. After I
killed and checked I start gnatsd on the server again, and I killed another
server like all what I did above.—
Reply to this email directly or view it on GitHub
#29 (comment).
from nats.go.
I have located the issue, will work on a solution to the problem. Thanks again.
from nats.go.
sorry for my delay.
- I wait for like a minute or a bit more.
- Some will success but some failed.
- Run on different machines.
- All go based, use your lib.
from nats.go.
I have found the problem, working through a solution, should be posted this
week. Thanks.
On Wed, Oct 15, 2014 at 3:14 AM, qinguoan [email protected] wrote:
sorry for my delay.
- I wait for like a minute or a bit more.
- Some will success but some failed.
- Run on different machines.
- All go based, use your lib.
—
Reply to this email directly or view it on GitHub
#29 (comment).
from nats.go.
I have just fix this issue in my project, with derek‘s kindly help.
Thank all you guys~
from nats.go.
Related Issues (20)
- Sequence number mismatch in NATS client after reconnection HOT 2
- Add stream compression option for object store buckets HOT 1
- KV Updating not available. UpdateStream only runs when there is no changes HOT 3
- JetStreamManager.AddConsumer ambiguous behaviour with existing consumer HOT 5
- Document version compatibility HOT 1
- processAuthError does not trigger a reconnect upon receiving 'authentication expired' HOT 1
- the cost of respToken in respHandler is much higher than expected HOT 2
- verifying github.com/nats-io/[email protected]: checksum mismatch HOT 4
- Panic on Calling Drain on a nil NATS Connection HOT 2
- With a NATS server with JetStream disabled `jetstream` package functions always returns `context deadline exceeded` HOT 5
- StreamConfig options are not considered when a stream is created HOT 6
- Implement Consumers Pause HOT 1
- [BUG] If the subject is very long, the connection will be broken
- [micro] Add API to read Reply subject from `micro.Request` HOT 6
- undefined: errors.Join HOT 2
- SubscribeSync should return error on permissions violation HOT 3
- jetstream.Consumer.Consume() does not respect ConsumerConfig HOT 1
- Fetch in the JetStream Simplified Client should behave similar to the old API. HOT 5
- jetstream.CreateOrUpdateKeyValue doesn't handle the Domain property of jetstream.ExternalStream correctly when mirroring HOT 1
- jetStreamContext.PublishMsg memory consumption grow over time if nats server fail or restart HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nats.go.