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

Ever-increasing worker goroutines #182

Open
4nte opened this issue Dec 13, 2021 · 2 comments
Open

Ever-increasing worker goroutines #182

4nte opened this issue Dec 13, 2021 · 2 comments
Assignees
Labels

Comments

@4nte
Copy link

4nte commented Dec 13, 2021

My volantmq broker eventually stops working due to too many workers.
I have unstable clients that frequently reconnect due to flaky network connections.

What is the best way to mitigate this?

goroutine profile: total 404
365 @ 0x63f430 0x614108 0x6140de 0x613e0b 0xa2c7cf 0x66a611
#	0xa2c7ce	github.com/VolantMQ/volantmq/types.(*pool).worker+0x9e	/go/src/github.com/VolantMQ/volantmq/types/pool.go:103

23 @ 0x63f430 0x63952a 0x638af5 0x6d29d5 0x6d394f 0x6d3931 0x7a3acf 0x7b7138 0xa40bd5 0x764403 0x76456f 0xa4c84a 0xa4c13e 0x66a611
#	0x638af4	internal/poll.runtime_pollWait+0x54					/usr/local/go/src/runtime/netpoll.go:184
#	0x6d29d4	internal/poll.(*pollDesc).wait+0x44					/usr/local/go/src/internal/poll/fd_poll_runtime.go:87
#	0x6d394e	internal/poll.(*pollDesc).waitRead+0x1ce				/usr/local/go/src/internal/poll/fd_poll_runtime.go:92
#	0x6d3930	internal/poll.(*FD).Read+0x1b0						/usr/local/go/src/internal/poll/fd_unix.go:169
#	0x7a3ace	net.(*netFD).Read+0x4e							/usr/local/go/src/net/fd_unix.go:202
#	0x7b7137	net.(*conn).Read+0x67							/usr/local/go/src/net/net.go:184
#	0xa40bd4	github.com/VolantMQ/volantmq/transport.(*conn).Read+0x54		/go/src/github.com/VolantMQ/volantmq/transport/conn.go:41
#	0x764402	bufio.(*Reader).fill+0x102						/usr/local/go/src/bufio/bufio.go:100
#	0x76456e	bufio.(*Reader).Peek+0x4e						/usr/local/go/src/bufio/bufio.go:138
#	0xa4c849	github.com/VolantMQ/volantmq/connection.(*reader).readPacket+0x79	/go/src/github.com/VolantMQ/volantmq/connection/reader.go:129
#	0xa4c13d	github.com/VolantMQ/volantmq/connection.(*reader).routine+0x11d		/go/src/github.com/VolantMQ/volantmq/connection/reader.go:80

@troian
Copy link
Member

troian commented Dec 17, 2021

thanks, i'll give it a think

@4nte
Copy link
Author

4nte commented Jan 28, 2022

@troian have you figured anything out? Any general pointers would be appreciated (if you have any, of course).
I'll try to open a PR in the following days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants