Skip to content

Random EOF errors on HTTP POST requests #1539

@ribtoks

Description

@ribtoks

Describe the bug

I'm using Docker-based Gatus for monitoring of a few endpoints (POST request with a hardcoded payload) of my service (at a step of 1 minute). From time to time Gatus shows red status and error reason is "EOF", request time is +/- 50ms. To investigate, I created a load test in Go that does the same request using vegeta and it went at tens of thousands of requests per second without a single error from the same node where Gatus works. Then I deployed Uptime Kuma again (from which a year ago I migrated to Gatus) and now for already about month there was not a single failure with Uptime Kuma (but Gatus "fails" every 5-10 minutes) and the same endpoints/payload. So I conclude the bug is in Gatus, unfortunately. I already tried various configuration push-ups (increase concurrency, timeouts etc.) to no avail.

How to fix or debug this problem? I tried enabling debug/verbose logs but there's the same EOF error in the logs.

What do you see?

No response

What do you expect to see?

Gatus does not fail to make a simple POST request with payload.

List the steps that must be taken to reproduce this issue

config (latest iteration, but it was more bare-bones and also failed):

skip-invalid-config-update: true
metrics: true
concurrency: 5

storage:
  type: sqlite
  path: /data/data.db

connectivity:
  checker:
    target: 1.1.1.1:53
    interval: 30s

ui:
  default-sort-by: group

web:
  read-buffer-size: 32768

server-api: &server-snippet
  method: POST
  interval: "60s"
  client:
    insecure: true
    timeout: 15s
  body: |
    qwerty12345
  headers:
    Host: "example.com"
    X-Api-Key: "${API_KEY}"
  conditions:
    - "[STATUS] == 200"
    - "[BODY].success == true"
endpoints:
  - name: "Server asdf API"
    url: "https://123.456.789.012/my-endpoint"
    <<: *server-snippet
    alerts:
      - type: pushover
        description: "Server API failed"

Version

stable

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions