probelabs/goreplay · error

File output reached size limit

Error message

File output reached size limit

What it means

FileOutput.PluginWrite refuses to append once the accumulated output size meets OutputFileMaxSize: the current file is complete and the error signals the caller to rotate to the next file rather than a real write failure — bytes were already written successfully.

Source

Thrown at output_file.go:257

			log.Fatal(o, "Cannot open file %q. Error: %s", o.currentName, err)
		}

		o.QueueLength = 0
	}

	var nn int
	n, err = o.writer.Write(msg.Meta)
	nn, err = o.writer.Write(msg.Data)
	n += nn
	nn, err = o.writer.Write(payloadSeparatorAsBytes)
	n += nn

	o.totalFileSize += size.Size(n)
	o.currentFileSize += n
	o.QueueLength++

	if Settings.OutputFileConfig.OutputFileMaxSize > 0 && o.totalFileSize >= Settings.OutputFileConfig.OutputFileMaxSize {
		return n, errors.New("File output reached size limit")
	}

	return n, err
}

func (o *FileOutput) flush() {
	// Don't exit on panic
	defer func() {
		if r := recover(); r != nil {
			Debug(0, "[OUTPUT-FILE] PANIC while file flush: ", r, o, string(debug.Stack()))
		}
	}()

	o.Lock()
	defer o.Unlock()

	if o.file != nil {
		if strings.HasSuffix(o.currentName, ".gz") {

View on GitHub (pinned to 251e45abd2)

Solutions

  1. Raise --output-file-max-size if you intended larger output files
  2. Let the rotation logic create the next file — this error is the expected rotation trigger
  3. Check disk quota if the limit was reached unintentionally
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at output_file.go:257 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of probelabs/goreplay@251e45abd2 (2026-09-02). Data as JSON: /api/errors/d9b4731c71e54ac4. Report an issue: GitHub.