niklasf / syzygy-tables.info

User interface and public API for probing Syzygy endgame tablebases
https://syzygy-tables.info
GNU Affero General Public License v3.0
60 stars 14 forks source link

429 Too Many Requests #359

Open elexunix opened 2 weeks ago

elexunix commented 2 weeks ago

Hello!

I'm trying to watch endgames optimal lines of play using syzygy-tables.info, and it has a very lovely option: if you press space, it will make the optimal move, and if you hold space, it will (at a reasonably fast pace for simple endgames) play you the optimal play automatically. However, there is an issue: after viewing some tens of moves, you start to get error 429. Moreover, if you wait for some seconds and try again, you will get 429 again, this time much sooner. But why, is it too expensive to automatically play optimal plays? I'm not trying to download anything using the web API (which I think is the true belief behind giving me 429)

The event (429) is much more probable when I browse small/fast endgames, like with just 4-5 pieces, e.g. the classical bishop+knight checkmate: https://syzygy-tables.info/?fen=8/8/8/6B1/8/8/4k3/1K5N_b_-_-_0_1 But shouldn't such small endgames be, on the contrary, much cheaper to request, since they are already in the server RAM, not HDD?

Thanks for the very interesting free endgame tablebase anyway!

niklasf commented 1 week ago

Some time in the next couple weeks Lichess will migrate their tablebase API to a new server, so maybe the rate limits can be raised then.

It's true that 5 piece requests are trivial, but unfortunately the rate limiter (limit_req in nginx) can't distinguish piece counts with the current setup.