From: Christopher Baines <mail@cbaines.net>
To: zimon.toutoune@gmail.com, 41708@debbugs.gnu.org
Subject: bug#41708: "guix weather" : 504 error
Date: Tue, 09 Jun 2020 22:12:32 +0100 [thread overview]
Message-ID: <87wo4g7xkv.fsf@cbaines.net> (raw)
In-Reply-To: <CAJ3okZ23kcBv8UirLSkziVT5N=sm2yt5rNCFx9rjr+LPDT1Y1w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2203 bytes --]
zimoun <zimon.toutoune@gmail.com> writes:
> By default, "guix weather" returns:
>
> --8<---------------cut here---------------start------------->8---
> 'https://ci.guix.gnu.org/api/queue?nr=1000' returned 504 ("Gateway Time-out")
> --8<---------------cut here---------------end--------------->8---
>
> which is not fatal but annoying. Especially, it takes time.
>
> As discussed on IRC [1], it seems that it is a bug server side.
>
> In addition, something appears similar with Bayfront, well the 4
> substitutes servers that I know returns:
>
> --8<---------------cut here---------------start------------->8---
> 'https://ci.guix.gnu.org/api/queue?nr=1000' returned 504 ("Gateway Time-out")
> 'https://bayfront.guix.gnu.org/api/queue?nr=1000' returned 504
> ("Gateway Time-out")
> (continuous integration information unavailable)
> 'https://guix.tobias.gr/api/queue?nr=1000' returned 410 ("Gone")
> --8<---------------cut here---------------end--------------->8---
Hey,
So I think I've got a patch [1] to Cuirass to "fix" this.
1: https://lists.gnu.org/archive/html/guix-devel/2020-06/msg00117.html
I expected this was due to the complicated part of the db-get-builds
query, but I think it's actually down to the simple part that fetches
all the outputs for all the builds. Fetching the outputs for a build is
slow, because at the moment, there's no index on the Outputs field, so
looking up the outputs requires reading through the whole table, and the
Outputs table can be quite large.
The performance should improve with the additional query. To see why,
you can use EXPLAIN QUERY PLAN to see what SQLite plans to do when
processing the query:
sqlite> EXPLAIN QUERY PLAN SELECT name, path FROM Outputs WHERE derivation = 'foo';
QUERY PLAN
`--SCAN TABLE Outputs
sqlite> CREATE INDEX Outputs_derivation_index ON Outputs (derivation);
sqlite> EXPLAIN QUERY PLAN SELECT name, path FROM Outputs WHERE derivation = 'foo';
QUERY PLAN
`--SEARCH TABLE Outputs USING INDEX Outputs_derivation_index (derivation=?)
I believe that searching the table using an index is going to be faster
than scanning the table, and testing locally and on bayfront suggests
this will resolve the performance issue.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]
next prev parent reply other threads:[~2020-06-09 21:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-04 14:34 bug#41708: "guix weather" : 504 error zimoun
2020-06-09 21:12 ` Christopher Baines [this message]
2020-06-13 13:18 ` zimoun
2020-06-13 16:23 ` Christopher Baines
2020-06-13 17:55 ` zimoun
2020-06-15 18:43 ` Christopher Baines
2020-06-15 20:02 ` zimoun
2020-06-15 20:23 ` Christopher Baines
2020-06-20 0:03 ` zimoun
2020-06-20 8:22 ` Christopher Baines
2020-06-24 10:10 ` zimoun
2020-06-24 12:58 ` Ricardo Wurmus
2020-06-24 13:06 ` zimoun
2020-06-16 10:15 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wo4g7xkv.fsf@cbaines.net \
--to=mail@cbaines.net \
--cc=41708@debbugs.gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).