Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

StackOverflow Point

StackOverflow Point Navigation

  • Web Stories
  • Badges
  • Tags
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Web Stories
  • Badges
  • Tags
Home/ Questions/Q 3296
Alex Hales
  • 0
Alex HalesTeacher
Asked: June 2, 20222022-06-02T08:30:24+00:00 2022-06-02T08:30:24+00:00

Readiness probe failed: Get "http://IP/health" dial tcp connection refused – GKE

  • 0

[ad_1]

After almost 120 days that services are working well in the containers which in the pods and managed by the deployment resource, I suddenly got the readinessProbe failed error which caused a block of the traffic from the Ingress to the Pods.

Generally, I don’t know why it happened, as I said it used to work for 120 days without an issue.

What I have tried

At first I was thinking that it is a rate limit issue as I saw that in the error log I seen Too many error: 429. So I flushed the rate limit data and it used to work again.

Then I completely excluded the /health endpoint from the rate limiter middleware and one day later it happened even though again.
What makes me to think that it’s not actually an inside rate limit middleware of Express.js, but something else, maybe something managed by GKE.

There are the probes in the yaml configuration:

              startupProbe:
                httpGet:
                  path: /health/?startup_probe=1
                  port: 3003
                initialDelaySeconds: 5
                periodSeconds: 5
                timeoutSeconds: 5
              readinessProbe:
                httpGet:
                  path: /health
                  port: 3003
                initialDelaySeconds: 3
                periodSeconds: 3
                timeoutSeconds: 3

Background

I just want to acheive a zero downtime deployment in Node.js app with K8S – so K8S will pass traffic to the container in the Pod only by the time that the app in the container has already been connected to the DB and ready to receive traffic. This check should be done only once actually – just after a restart of a new deployment rollout.

So in the /health/startup_probe=1 I do check connections to the DB, and this happens only once as I need.
And the readinessProbe just checks that the node app functions and receiving requests to the API endpoint (without DB checks).

However, I found that it useful to also add a readinessProbe since without that I had issues in the past – Pods remain on read 0/1 for too long.

Also, when I place logs on the /health path I see that in stead of 1 log in 3 second as stated in the periodSecond: 3 it actually logs 3 times pre second. Why does it happening?

What is the best configuration to achieve Node.JS zero downtime deployment with K8S?
I don’t think that I point to some corner case – it’s just the basic of the the basic..

[ad_2]

  • 0 0 Answers
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Related Questions

  • xcode - Can you build dynamic libraries for iOS and ...

    • 0 Answers
  • bash - How to check if a process id (PID) ...

    • 3 Answers
  • database - Oracle: Changing VARCHAR2 column to CLOB

    • 5 Answers
  • What's the difference between HEAD, working tree and index, in ...

    • 4 Answers
  • Amazon EC2 Free tier - how many instances can I ...

    • 0 Answers

Stats

  • Questions : 43k

Subscribe

Login

Forgot Password?

Footer

Follow

© 2022 Stackoverflow Point. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.