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

Help have a look at this log #455

Open
lucasjinreal opened this issue Feb 13, 2025 · 2 comments
Open

Help have a look at this log #455

lucasjinreal opened this issue Feb 13, 2025 · 2 comments
Labels
question Further information is requested

Comments

@lucasjinreal
Copy link

I debug for days, can't resovle this:

time=2025-02-13T21:55:28.651+08:00 level=INFO msg="attached listener" id=t11 protocol=tcp address=[::]:1883
INFO[0002] Start ServerMQTTv2 at port: :1883
time=2025-02-13T21:55:28.651+08:00 level=INFO msg="added hook" hook=my-hook
time=2025-02-13T21:55:28.651+08:00 level=INFO msg=initialised hook=my-hook
time=2025-02-13T21:55:28.651+08:00 level=INFO msg="added hook" hook=pebble-db
time=2025-02-13T21:55:28.665+08:00 level=INFO msg="mochi mqtt starting" version=2.6.7
time=2025-02-13T21:55:28.665+08:00 level=INFO msg="mochi mqtt server started"
time=2025-02-13T21:55:37.234+08:00 level=WARN msg="" listener=t11 error="server busy"
time=2025-02-13T21:55:51.463+08:00 level=WARN msg="" listener=t11 error="server busy"
time=2025-02-13T21:55:51.571+08:00 level=WARN msg="" listener=t11 error="server busy"
time=2025-02-13T21:55:56.622+08:00 level=WARN msg="" listener=t11 error="server busy"

Any hints why this happen?

The error just happen after once code upgrade simple go get..

And code can not be run... The client can not connect anymore

@lucasjinreal
Copy link
Author

OK, the error caused by:

server := mqtt.New(&mqtt.Options{
	InlineClient: true,
	// Capabilities: &mqtt.Capabilities{
	// 	MaximumMessageExpiryInterval: 60 * 60 * 24 * 5,
	// 	MaximumSessionExpiryInterval: 60 * 60 * 24 * 5},
})

the Capabilities, why?

@thedevop
Copy link
Collaborator

This error is returned when number of clients reach MaximumClients. By default, it is set to MaxInt64 (effectively unlimited). This is to prevent server allowing more clients than what the hardware resources are available (especially memory).

@thedevop thedevop added the question Further information is requested label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants