lichess-org / lila

♞ lichess.org: the forever free, adless and open source chess server ♞
https://lichess.org
GNU Affero General Public License v3.0
15.09k stars 2.23k forks source link

external engine gets rate limited when scrolling through moves in a quick succession in analysis board #14008

Closed Juesto closed 9 months ago

Juesto commented 10 months ago

Exact URL of where the bug happened

any analysis board with lots of moves present

Steps to reproduce the bug

  1. activate external engine
  2. have a game with lots of moves
  3. scroll quickly through moves

What did you expect to happen?

external engine still analyses the moves

What happened instead?

external engine is stuck loading engine or calculating moves or says error loading engine example-provider.py console shows engine.lichess.ovh is returning 429 too many requests

Operating system

Windows

Browser and version (or alternate access method)

Chrome 109 - External Engine API

Additional information

this is caused by the client initiating a engine analysis request on every move. this does not happen if a cloud move is present

schlawg commented 9 months ago

Do you think it's possible you got 429s for a different reason?

schlawg commented 9 months ago

I'm not doubting you there at all, just confirming that you weren't also simultaneously testing a bot or something.

There is a new 700ms throttle clientside that should also limit return POSTs from the provider. That throttle code is live now, but I'm unsure whether it will be sufficient. We'll need to test it on lichess.org rather than gitpod as constraints can be configured by IT external to the application(s).

I've also reached out to more knowledgeable folks @ lichess for a better understanding of the limits affecting lila & the broker.

Juesto commented 9 months ago

i solely was using the external engine feature, that's the only thing i was doing with lichess.ovh thanks for implementing!

schlawg commented 9 months ago

700ms should suffice.