OpenShift: Pod often does not return expected requests

Viewed 23

I'm running a .dotnet 3.1 RestAPI inside a pod in Openshift, and it process every request smoothly - all transactions to the database (outside the Openshift network) are executed properly, all programatic executions are being finalized without errors. However, 1 in 15 requests will always ECONNRESET and fail to return the HTTP request.

Let's say I make a GET to /users/id/3 - I can see this request hitting my restAPI, being processed all the way down the infra layer, fetch data from the DB, wrap the return, and send it back finishing the request, however at this point, no return is received by the frontend, or postman, but I can see on the API logs that the request was finished and returned.

All of this requests take 2.3min to execute, and often finish in a ECONNRESET. I'm at odds at how to troubleshoot this. I have tried curl'ing the resource in another pod and the same behaviour appears.

I think these requests sometimes are getting lost in the cluster network, so I tried playing with the sessionaffinity of the service config but it's not really tied to this, as far as I understood. Do I have a wrong route config, or service config?

Route config

spec:
  host: api.com.cloud
  to:
    kind: Service
    name: api
    weight: 100
  port:
    targetPort: 8080-tcp
  tls:
    termination: edge
  wildcardPolicy: None
status:
  ingress:
    - host: api.com.cloud
      routerName: default
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: XXXX
      wildcardPolicy: None
      routerCanonicalHostname: router-default.apps.com.cloud
Service config

spec:
  clusterIP: XXXX
  ipFamilies:
    - IPv4
  ports:
    - name: 8080-tcp
      protocol: TCP
      port: 8080
      targetPort: 8080
  internalTrafficPolicy: Cluster
  clusterIPs:
    - XXX
  type: ClusterIP
  ipFamilyPolicy: SingleStack
  sessionAffinity: None
  selector:
    deploymentconfig: api
status:
  loadBalancer: {}
0 Answers
Related