arturictus / sidekiq_alive

Liveness probe for Sidekiq in Kubernetes deployments
MIT License
194 stars 57 forks source link

Pods keep failing health check #35

Closed i5okie closed 3 years ago

i5okie commented 4 years ago

Hi,

I'm using : sidekiq (5.2.7) sidekiq_alive (2.0.1)

Deployment:

spec:
      containers:
      - name: sidekiq
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        command: ["bin/bundle", "exec", "sidekiq"]
        args: ["-q", "critical", "-q", "notifications", "-q", "default", "-q", "low"]
        ports:
          - containerPort: 7433
          - containerPort: 9394
         livenessProbe:
           httpGet:
             path: /
             port: 7433
           initialDelaySeconds: 80 # app specific. Time your sidekiq takes to start processing.
           timeoutSeconds: 5 # can be much less
         readinessProbe:
           httpGet:
             path: /
             port: 7433
          initialDelaySeconds: 80 # app specific
          timeoutSeconds: 5 # can be much less

I have another deplyimg mirrors config above, except i'm specifying a different queue there.

it keeps failing the liveness or readiness probe every few minutes and reboots: image

some are saying Detected parent died, dying others show nothing in logs that would indicate anything going wrong.

arturictus commented 4 years ago

Hi @i5okie, I do not have enough information to help. Maybe you are not exposing the port in your dockerfile? Dockerfile

EXPOSE 7433

Try running your image locally and curl to the port

docker run -p 7433:7433  IMAGE bin/bundle exec sidekiq
curl localhost:7433
arturictus commented 4 years ago

OK, It looks like port is exposed. Can you check in the web interface if the sidekiq_alive queues are running/ added to the queue list?

ook commented 4 years ago

Hi. I have the same problem than this ticket: I checked and queues are here, the jobs are regulary launched, the redis key is written. I see a puma starting from sidekiq (with 4 workers, which seems a lot). Port 7433 is unreachable.

arturictus commented 3 years ago

Hi, This seems a network configuration out of the scope of this library. If you want to provide examples of configurations or common network configuration errors and the solution as documentation in a PR I'm happy to merge it, otherwise not much to do here. Thanks