简体   繁体   中英

Websocket API only returning http 429 on Azure API Management

We have a web application consuming our own MQTT topic over websocket, published using the MQTTnet library. On top of this, we have defined a Websocket API in Azure API Management. This has worked fine until 2022-06-06. Suddenly, all websocket requests are rejected with a http 429 'Too Many Requests' from APIM. The APIM doesn't even try to contact the service.

I could have understood this if there was a heavy load, but we only have a handful of application users from within the company, so we are far from the 200 users limit that ther documantation describes. The application sneds a few (5-10) reconnection attempts within a few seconds. The MQTT service and the APIM API have been rebuilt in order to remove any hanging sessions, but to no help.

Has anyone run into similar problems? Could the APIM team have changed any internal logic that suddenly started trigging the http 429 responses?

I have started to experience the exact same issue around the same time (having never seen it before). My understanding from speaking to azure support on this is that the docs are wrong. It is 100 active websocket connections per service unit. It also seems that the active count is not reduced as expected when websockets are closed.

The observability on what is an active websocket session is very much lacking in azure and was acknowledged by azure support. I typically need to wait 1-2 days after the limit is breached before my application can open websockets again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM