-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gate timeout error messages #125
Comments
I've seen similar messages, but only the case where the opponent hastily aborts the game before the first move. |
This happens because:
If anyone has a good idea of how to fix this, make a PR or I will get to it once I have some time. |
I am rather seeing this in the middle of a game, not at the beginning... I'll try to get some examples with actual timestamps. Is there a way I can turn more verbose logging? |
@OhJayGee you can pass the -v flag: |
This can happen if game is finishing by any reason while BOT is thinking and then wants to @careless25 maybe I'm wrong but I think 2.b. (Lichess send game ended notification) is a non existing thing. If this statement is correct I can imagine a workaround like this: If HTTPError raised by What do you think, is this a usable idea or there is something better? |
It seems the workaround is necessary in any event, since Lichess is online and messages take time to propagate. |
newer observation: in the last week I did not observe any timeout flags caused by this error. Did anything change on the backend? |
Thank you @gbtami , for linking bug #128. Here it is a log and a picture that express exactly that: Here a complete log, since BOOT until error. Very small, because it is in the first move.
You can see, it is the start position. Xadreco sent lichess-bot tried to forward this move to the site and got a
It seems that the bot needs to check if the game is still ongoing before trying to forward the move to the engine. The engine has no way to know that it don't need to move. To the engine, just send a |
Arguably Either way, 12 retries in the face of an Hmm... maybe something like the following would help: |
Here another twist:
Here the complete log:
So, it is kind of the same error, but instead of "abort" it was a game that ended due to normal reasons (timeout in this case). Solution: Bot should see the game is ended, discard any output from engine and ask engine to quit. |
Hi @ddugovic , I think it is not related to protocol. Both Xboard and UCI specifiees how much time the engine has left on the clock. Xboard actually have many ways to deliver time to the engine.
To tell that the engine author should use better the time control and never loses on time is to displace responsibilities from what each program have, mixing things. Of course I understand engine authors that would not even "imagine" an engine that may lose on time, or that will resign without a fight, or whatever. Most of engine authors simply tries to deliver the most "powerful" move, whatever that means. Xadreco is much more like a human, it does lose on time, it resigns, it offer draws, if sacrifices without sound continuation; man, it even play random moves every now and them (literally "random"). So, if a engine loses on time, the communication bot should command it (whatever protocol) to stop.
Also, if the engine reply with a move before it could process the command to stop, lichess-bot should just ignore it, instead of trying to post it and get an 404 error in a finished game. |
Do not retry on HTTPError due to opponent abort #125
@drbeco :
|
Got a new incident: In a 3'+1 game the bot normally should never lose on time as it can move within 20msec, plus 37ms ping time to the lichess server, and I have configured a 500ms overhead time, so 1 second is plenty. Yet 0.6s penalty for server error could have triggered loss on time. |
I too (running in OVH!) have observed a single HTTP 504 response:
|
This is very likely a problem of Lichess itself, not of the bot. One of the database servers is slower than usual, leading to timeouts every now and then. We're working on it ... Edit: The issue I am talking about started on the 23rd of June. Timeouts should be much less frequent before that. |
Fix #125 gate timeout error messages
I am seeing a number of errors from lichess-bot following the same pattern (see below).
All of them lead to a abort/game over or loss on time.
Does anybody else see that? is that actual connectivity, because the URLs seem correct, and the machines' internet connectivity was fine as well...
best regards,
OJG
+++ https://lichess.org/bG43Aj81/black Bullet vs BOT F_Me_Im_Famous(1500?) ERROR:backoff:Backing off api_post(...) for 0.9s (requests.exceptions.HTTPError: 504 Server Error: Gateway Time-out for url: https://lichess.org/api/bot/game/bG43Aj81/move/d1e2) ERROR:backoff:Giving up api_post(...) after 2 tries (requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://lichess.org/api/bot/game/bG43Aj81/move/d1e2) Abandoning game due to connection error Traceback (most recent call last): File "lichess-bot.py", line 150, in play_game li.make_move(game.id, best_move) File "/ChessEngines/lichess-bot/lichess.py", line 71, in make_move return self.api_post(ENDPOINTS["move"].format(game_id, move)) File "/ChessEngines/lichess-bot/.venv/lib/python3.6/site-packages/backoff/_sync.py", line 99, in retry ret = target(*args, **kwargs) File "/ChessEngines/lichess-bot/lichess.py", line 61, in api_post response.raise_for_status() File "/ChessEngines/lichess-bot/.venv/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://lichess.org/api/bot/game/bG43Aj81/move/d1e2 --- https://lichess.org/bG43Aj81/black Game over
The text was updated successfully, but these errors were encountered: