Skip to content

Server Update 2024-12-30

(This message is synchronized from Discord.)

MJAPI服务端进行了小更新,修复了请求速率限制中的小问题:在超过软限制速率的请求占用硬限制速率的额度后,如果请求中断,被占用的硬限制速率的额度不会恢复,导致后续请求在超过软限制速率后,因为没有硬限制速率的额度而直接返回HTTP错误码429 Too Many Requests,正确的行为是延后处理超过软限制速率的请求,直到队列长度达到硬限制速率,中断的请求不再占用队列。这个问题之前可能影响到了客户端异常关闭的用户,但是只要客户端有重试逻辑,应该没有受到实际影响。另外,根据服务器资源占用统计,临时用户总数降至20,24小时内mjai事件数限制不变。

A small issue in the request rate limiting has been fixed in the minor update of the MJAPI server: when request rates exceed the soft rate limit and use quota of the hard rate limit, if the requests are aborted, the used quota of the hard rate limit will not be freed; it results in the server directly return the HTTP status code 429 Too Many Requests, if the rates of the following requests exceed the soft rate limit. The correct behavior is to delay the processing of requests of which the rates exceed the soft rate limit, until the length of the queue reaches the hard rate limit. Aborted requests no longer stay in the queue. This issue may have impacted users whose clients exited unexpectedly, but there should be no real consequences if the clients had retry logic. Besides, according to the statistics of the server load, the total number of temporary users is decreased to 20, while the limit of the number of mjai events every 24 hours is unchanged.