Rust Playground down too often

During the last several weeks, there have been repeated (in fact quite frequent) and disruptive problems with the Rust Playground. Sometimes, it doesn't load gists, sometimes, it's unable to compile and/or run any code, sometimes it spits out seemingly random errors that don't stem from the code being edited.

As a frequent visitor of this forum, I find it pretty annoying: it's routinely used by others and me to ask questions and answer them. Can we please do something about it? I appreciate that it's being developed continuously, but that shouldn't come at the price of stability and usability.

14 Likes

Copied from Jake today, the author of Rust playground

The recent minor outage / overload made me look into some Nginx errors more deeply. Thanks to Sean McArthur and Noah Kennedy walking me through some debugging, we figured out that the playground's Nginx configuration was set to reverse proxy to localhost. However, the machine routes localhost to both 127.0.0.1 (IPv4, which we listen to) and ::1 (IPv6, which we do not).

This means some percentage of requests have been "randomly" failing to make it upstream. :face_palm:

This is been the case since at least October 2021 (when we put the config into a git repo), and likely before that as well.

This has been manually edited in production as a test. The error rates have gone way down, so I'll likely be making the change more permanent soon.

src: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/playground.20sporadic.20errors


Some related issues

It seems issues to playground can get quick responded in Rust's zulipchat infra stream.

14 Likes

This doesn't answer you directly but I've been using Rust Explorer to aid me while working through Rustlings. It has integrated Rust Analyzer, so you get all of the intellisense and compiler help richness. :slightly_smiling_face:

It also keeps a history without your having to be logged in. I don't know how long for though, but it's at least a month.

2 Likes

I did occasionally fall back to play.integer32.com which sometimes worked for me when the rust-lang.com one didn't. (Though honestly I have no idea why that one sometimes had fewer problems, as it's essentially the same thing, isn't it? The play.rust-lang.com one also mentions integer32 on their about/help page.) Apparently, the gists and links are the same anyways, so you can simply modify the domain on an existing link one way or the other and the code will be there.

1 Like

I did that too... but figure it might be subject to the tragedy of the commons once enough other people do. Unless the latest unpleasantness was the result of an upgrade that got rolled back like last time and the two domains move at different paces or something.

Maybe not though, every ```rust containing Rustdoc hits the playground domain too [1]. Perhaps the two use cases should hit distinct services by design.


  1. by default? Didn't look to see if it's customizable ↩︎

Yes, it's customizable: The #[doc] attribute - The rustdoc book

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.