Skip to content
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

[RTD][Sphinx] Server Error 503: first byte timeout for objects.inv #559

Open
amotl opened this issue Dec 10, 2024 · 6 comments
Open

[RTD][Sphinx] Server Error 503: first byte timeout for objects.inv #559

amotl opened this issue Dec 10, 2024 · 6 comments
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested

Comments

@amotl
Copy link
Member

amotl commented Dec 10, 2024

Problem

This error happens when building the Sphinx documentation. We are hosting the documentation on Read the Docs (readthedocs.org), behind an Nginx for dispatching routes, and Fastly for caching.

intersphinx inventory 'https://cratedb.com/docs/cloud/cli/en/latest/objects.inv' not fetchable due to
<class 'requests.exceptions.HTTPError'>: 503 Server Error: first byte timeout for url:
https://cratedb.com/docs/cloud/cli/en/latest/objects.inv

It's classified as a bug Something isn't working , because it breaks developer and CI workflows. Not constantly, but it seems to happen more often now.

Reports

October 28, Slack

Second time within a week I'm seeing test failures with:

intersphinx inventory 'https://cratedb.com/docs/sqlalchemy-cratedb/objects.inv' not fetchable due to
<class 'requests.exceptions.HTTPError'>: 503 Server Error: first byte timeout for url:
https://cratedb.com/docs/sqlalchemy-cratedb/objects.inv

Do we have some server issues there ?

November 1, Slack

Also on GHA.

intersphinx inventory [...] not fetchable
503 Server Error: first byte timeout for url

-- https://github.com/crate/crate-python/actions/runs/11628806414/job/32384615498?pr=664#step:4:262

December 10, Slack

Do we have any new insights on those errors? Seems to happen more often now. 😞

intersphinx inventory 'https://cratedb.com/docs/cloud/cli/en/latest/objects.inv' not fetchable due to
<class 'requests.exceptions.HTTPError'>: 503 Server Error: first byte timeout for url:
https://cratedb.com/docs/cloud/cli/en/latest/objects.inv
@amotl amotl added the bug Something isn't working label Dec 10, 2024
@amotl amotl changed the title [RTD] Server Error 503: first byte timeout [RTD][Sphinx] Server Error 503: first byte timeout for objects.inv Dec 10, 2024
@amotl
Copy link
Member Author

amotl commented Dec 10, 2024

It might be coming from Fastly. At least, it is Fastly that raises this very error after experiencing a timeout to upstream servers.

bereq.first_byte_timeout

  • The amount of time Fastly should wait for a backend server to deliver the first byte of an HTTP response body, before triggering a timeout.
  • May be set to any value between 0 and 600s. By default, the timeout is 15s.
  • If the timeout is triggered, Fastly will create an error object and raise 503: first byte timeout.

-- Documentation about bereq.first_byte_timeout

@msbt: Can you please check which value is configured in Fastly for the particular /docs route, or otherwise globally? Thanks!

@amotl amotl added help wanted Extra attention is needed question Further information is requested labels Dec 10, 2024
@msbt
Copy link
Collaborator

msbt commented Dec 12, 2024

@amotl we have first_byte_timeout = 15s; set for all our services. Do we know if this is actually a timeout (like is it trying for 15s)? @goat-ssh might be able to shed some light, since he has access to the Fastly logs.

@amotl
Copy link
Member Author

amotl commented Dec 12, 2024

access to the Fastly logs.

That would be cool, to get insights if there is something in the logs at those spots where Fastly communicates with our Nginx.

@amotl
Copy link
Member Author

amotl commented Dec 12, 2024

@goat-ssh: Placeholder for log extract that shows there are spurious 503s on different URLs, maybe trimmed to increase the focus on relevant details. Just go ahead and replace this message. Thanks!

@amotl
Copy link
Member Author

amotl commented Dec 12, 2024

Thanks for sharing. That's quite a few 503 responses at different ends, not exclusively about objects.inv, right?

a) It will be nice to have a graph about them, to learn about trends.
b) It will be nice to follow up through them on behalf of the logs of our Nginx web server that is reverse-proxying to readthedocs.org, in order to potentially expand our learning about their origins.

NB: Please note this is a public ticket that wants to be concise about any potential matters of this being possibly related to objects.inv, and should not be used for general extensive debugging. Now that we learn the 503 responses are spurious, and not related to objects.inv at all, other than requests to those will certainly be very frequent, we may continue debugging the root cause on a different spot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants