vitessio/vitess · info

invalid /throttlerlogz path

Error message

invalid /throttlerlogz path

What it means

throttlerlogzHandler parses the URL path with strings.SplitN(path, "/", 3) and requires exactly 3 segments (/throttlerlogz/<name>). If the path has fewer segments (e.g. no trailing slash), it returns 404 'invalid /throttlerlogz path'. The longest supported URL is /throttlerlogz/<name>.

Source

Thrown at go/vt/throttler/throttlerlogz.go:115

`

var (
	logEntryTemplate  = template.Must(template.New("logEntry").Parse(logEntryHTML))
	logFooterTemplate = template.Must(template.New("logFooter").Parse(logFooterHTML))
)

func init() {
	servenv.HTTPHandleFunc("/throttlerlogz/", func(w http.ResponseWriter, r *http.Request) {
		throttlerlogzHandler(w, r, GlobalManager)
	})
}

func throttlerlogzHandler(w http.ResponseWriter, r *http.Request, m *managerImpl) {
	// Longest supported URL: /throttlerlogz/<name>
	parts := strings.SplitN(r.URL.Path, "/", 3)

	if len(parts) != 3 {
		http.Error(w, "invalid /throttlerlogz path", http.StatusNotFound)
		return
	}

	name := parts[2]
	if name == "" {
		// If no name is given, redirect to the list of throttlers at /throttlerz.
		http.Redirect(w, r, "/throttlerz", http.StatusTemporaryRedirect)
		return
	}

	if !slices.Contains(m.Throttlers(), name) {
		http.Error(w, "throttler not found", http.StatusNotFound)
		return
	}

	showThrottlerLog(w, m, name)
}

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Request /throttlerlogz/ with a trailing slash to get the throttler list redirect.
  2. Request /throttlerlogz/<throttler-name> for a specific throttler's log.
  3. Get the exact throttler name from /throttlerz and append it to the path.
  4. If serving behind a proxy, ensure it does not strip the trailing slash.

Example fix

// before
curl http://localhost:15000/throttlerlogz
// after
curl http://localhost:15000/throttlerlogz/
Defensive patterns

Strategy: validation

Validate before calling

p := r.URL.Path
if !strings.HasPrefix(p, "/throttlerlogz/") {
	return fmt.Errorf("use /throttlerlogz/ or /throttlerlogz/<name>")
}

Prevention

When it happens

Trigger: Requesting /throttlerlogz (no trailing slash, produces only 2 parts after split) or any path with fewer than 3 '/'-separated segments, on a vitess process exposing the throttler debug endpoints.

Common situations: Typing /throttlerlogz in a browser without trailing slash and name; old bookmarks; scripts missing the trailing slash before the throttler name.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/9a9d403d9d23d721. Report an issue: GitHub.