Skip to content

ERROR_CODE_CANCELLED, "context canceled" errors in logs after enabling the distributed mode on #2700

@fryderykdyc-sennder

Description

@fryderykdyc-sennder

Hi, up until recently we were running permify in a few k8s replicas but without enabling the distributed caching mode. Everything was running fine and the logs were looking good.

Earlier this week we enabled the distributed mode caching. Attaching the respective part of configuration below.
Everything apparently works fine. Depending services don't report errors, the http traces in datadog look good (we talk to permify using http protocol).

However I see:

  • errors in datadog when I select "grpc.server.request" as the trace type.
  • in logs I get a lot of following errors:
{
  "msg": "finished call",
  "protocol": "grpc",
  "level": "ERROR",
  "peer": {
    "address": "100.104.77.54:9983"
  },
  "time": "2025-12-16T12:24:01.044956289Z",
  "grpc": {
    "start_time": "2025-12-16T12:24:01Z",
    "request": {
      "deadline": "2025-12-16T12:24:05Z"
    },
    "component": "server",
    "code": "Internal",
    "method": "Check",
    "service": "base.v1.Permission",
    "method_type": "unary",
    "time_ms": "24.775",
    "error": "rpc error: code = Internal desc = ERROR_CODE_CANCELLED"
  }
}

{
  "msg": "ERROR_CODE_CANCELLED",
  "level": "ERROR",
  "time": "2025-12-16T12:24:01.044936916Z"
}

{
  "msg": "rpc error: code = Canceled desc = context canceled",
  "level": "ERROR",
  "time": "2025-12-16T12:24:01.044859883Z"
}

{
  "msg": "finished call",
  "protocol": "grpc",
  "level": "ERROR",
  "peer": {
    "address": "100.104.77.54:9983"
  },
  "time": "2025-12-16T12:24:00.86811204Z",
  "grpc": {
    "start_time": "2025-12-16T12:24:00Z",
    "request": {
      "deadline": "2025-12-16T12:24:04Z"
    },
    "component": "server",
    "code": "Internal",
    "method": "Check",
    "service": "base.v1.Permission",
    "method_type": "unary",
    "time_ms": "0.487",
    "error": "rpc error: code = Internal desc = ERROR_CODE_CANCELLED"
  }
}

{
  "msg": "finished call",
  "protocol": "grpc",
  "level": "ERROR",
  "peer": {
    "address": "100.104.77.54:9983"
  },
  "time": "2025-12-16T12:24:00.582466849Z",
  "grpc": {
    "start_time": "2025-12-16T12:24:00Z",
    "request": {
      "deadline": "2025-12-16T12:24:04Z"
    },
    "component": "server",
    "code": "Internal",
    "method": "Check",
    "service": "base.v1.Permission",
    "method_type": "unary",
    "time_ms": "0.805",
    "error": "rpc error: code = Internal desc = ERROR_CODE_CANCELLED"
  }
}

and so on.

Is it some actual issue I shall worry about? Or just some internals are mistakenly interpreted as errors while they are really not?

My configuration of the distributed mode:

      distributed:
        enabled: true
        address: "permify-service.permify-service.svc.cluster.local:5000"
        port: "5000"

Metadata

Metadata

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