Got ErrorMessage von Balena API - Balena error code 429 ("Too Many Requests")

Hello There!

Since last wednesday (28.09.2022) we’ve got tons of Error Messages from Balena.
Have any changes been made to the API?

Thank you Very Much for the Information.

Greetings Lukas

Hi Lucas,

Could you give some more details about what new error messages you are seeing, and where you are seeing them?

HI @rcooke-warwick
We got this Error Messages in the Balena UI (Top Right).

And also when we want to Authenticate by Balena from one of our Servers:

[qtp1887015670-70378] ERROR spark.http.matching.GeneralError - 
xxx.configserver.publicapi.auth.BalenaApiException: Balena error code 429 ("Too Many Requests")
	at 
xxx.AuthenticationService.verifyBalenaLogin(AuthenticationService.java:47)
	at xxx.configserver.publicapi.auth.DeviceAuthenticationRestService.lambda$static$2(DeviceAuthenticationRestService.java:74)
	at spark.RouteImpl$1.handle(RouteImpl.java:72)
	at spark.http.matching.Routes.execute(Routes.java:61)
	at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:134)
	at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1671)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:505)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
	at java.base/java.lang.Thread.run(Thread.java:830)

Hello, are you by any means doing a lot of auth requests at the same time? The error 429 you get from balena-api is our rate limit to avoid brute force attempts of logins.
From you stack trace I see that you have an HTTP server that executes an auth call automatically, you probably should take a look on only doing login if the user isn’t already on a session and check on how many auth requests you are triggering.