Closed SquidDev closed 3 years ago
Still errors occurring relatively often (note the bot isn't used that much anyway, so there's a good chunk of requests failing).
I've migrated the bot to run under podman instead (makes it easier to manage via systemd). Curious to see if this effects the network connectivity at all.
[2021-03-22 20:50:35.590] [INFO/ccfaq.commands.docs] event=search search="textutils.serialize"
[2021-03-22 20:50:35.586] [INFO/ccfaq.commands.docs] event=search search="textutils.serialise"
[2021-03-22 20:50:35.579] [INFO/cached_request] Finished request.
[2021-03-22 20:50:35.079] [INFO/ccfaq] Fired doc by XXX
[2021-03-22 20:50:24.026] [INFO/cached_request] Fetching https://tweaked.cc/index.json
[2021-03-22 20:50:24.025] [INFO/ccfaq] Fired doc by XXX
Reopening, as the poor latency does still cause confusion when people use %doc
instead of /docs
. Here we can see someone triggering the command once, getting irritated and triggering it again. Understandable - 10s of latency is not good!
We could try switching over to aiohttp - would mean we don't need threads and might be better than urllib. Still don't know where the latency is :/.
The latency appeared to be in DNS resolution. I've updated my DNS config to use a different server and this appears to have resolved the issue.
We're getting an awful lot of failures in the logs recently:
The issue here is that the request is taking 5 seconds (04:13:12.7 to 04:13:17.9). I'm not sure why -
curl
takes 0.2s from the same container. Looking at our logs, we can see the actual request is pretty much instantaneous.The 5s delay means that our token for posting a slash command response has timed out, and so we never respond to the user.
I think there's a couple of solutions here:
index.json
periodically (~30m?), possibly allowing SIGHUP to reload it. This would also reduce the delay when running%docs
.