Skip to content

x/tools/godoc/proxy: proxying to playground sometimes hangs perpetually #28134

Closed
@andybons

Description

@andybons

Running the program below gives very different results. Sometimes hanging for three minutes until finally giving up, or going through without issue. This only tests the /compile endpoint. It's uncertain whether this affects the /share endpoint as well.

Worth flagging since we just switched over to flex on golang.org.
/cc @broady @dmitshur @bradfitz

package main

import (
	"bytes"
	"fmt"
	"io"
	"log"
	"net/http"
	"os"
	"time"
)

func main() {
	buf := bytes.NewBuffer([]byte("version=2&body=package+main%0Aimport+%22fmt%22%0Afunc+main()%7Bfmt
.Println(%22Hello%2C+%E4%B8%96%E7%95%8C%22)%7D"))
	t := time.Now()
	resp, err := http.Post("https://golang.org/compile", "application/x-www-form-urlencoded; charset=
UTF-8", buf)
	if err != nil {
		log.Fatal(err)
	}
	defer resp.Body.Close()
	io.Copy(os.Stderr, resp.Body)
	fmt.Fprintln(os.Stderr)
	fmt.Fprintf(os.Stderr, "Took %v\n", time.Since(t))
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.SoonThis needs action soon. (recent regressions, service outages, unusual time-sensitive situations)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions