Skip to content
This repository was archived by the owner on Aug 10, 2026. It is now read-only.
This repository was archived by the owner on Aug 10, 2026. It is now read-only.

probe failed: context deadline exceeded #25

Description

@heidihe2024

I'm using coroot-aws-agent, trying to monitor the postgres rds aurora instances, which

  1. starts a pg db collector: https://github.com/coroot/coroot-aws-agent/blob/main/rds/collector.go#L125-L147. If I read it right, it ping the postgres DSN during this process: https://github.com/coroot/coroot-pg-agent/blob/main/collector/collector.go#L108-L113
  2. Once confirmed that postgres collector started, it calls the pg-agent "collect" function, which also triggers a PING: https://github.com/coroot/coroot-pg-agent/blob/main/collector/collector.go#L325-L326 However, my system also failed at this step with "probe failed: context deadline exceeded".

I've tested in the coroot-aws-agent, trying to connect to db using psql "postgresql://user:password@ip:port/5432/postgres..". Everything works. Do you have any idea what I'm missing here?
Is it due to the https://github.com/coroot/coroot-pg-agent/blob/main/collector/collector.go#L108

c.db.SetMaxOpenConns(1)
	pingCtx, pingCancelFunc := context.WithTimeout(ctx, collectTimeout)

and keep the postgres connection?

Thank you for your time!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions