question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

worker keep logging of "waiting for db"

See original GitHub issue

Description

I ran the app in kubernetes but worker pod kept logging “waiting for db”

Steps to reproduce the issue, if relevant: just follow the steps kubectl create namespace vote then kubectl create -f k8s-specifications/ then kubectl logs worker... you will meet the error of waiting for db

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
cadeomontanhacommented, May 31, 2020

I found another way to do this configs.

Include this environment variable inside your k8s-specifictions/db-deployment.yaml:

   ` - name: POSTGRES_HOST_AUTH_METHOD `
    `  value: trust`

After changing this configuration above, postgres displays this message:


WARNING: POSTGRES_HOST_AUTH_METHOD has been set to “trust”. This will allow anyone with access to the Postgres port to access your database without a password, even if POSTGRES_PASSWORD is set. See PostgreSQL documentation about “trust”: https://www.postgresql.org/docs/current/auth-trust.html In Docker’s default configuration, this is effectively any other container on the same system.

     It is not recommended to use POSTGRES_HOST_AUTH_METHOD=trust. Replace
     it with "-e POSTGRES_PASSWORD=password" instead to set a password in
     "docker run".

Important: Use this configuration only in TEST environments and following documentation recommendations

4reactions
eliezerreiscommented, Apr 14, 2020

Hi,

Using docker-compose the image is built when running the command as others have mentioned. However, using swarm or Kubernetes, as she is trying to do, the image is pulled from the docker hub, which is outdated.

spec:
      containers:
      - image: dockersamples/examplevotingapp_worker
        name: worker

Using Kubernetes or swarm you have to build the image locally and change the image path accordingly until they fix it.

Best regards,

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extreme wait-time when taking a SQL Server database offline
For me, I just had to go into the Job Activity Monitor and stop two things that were processing. Then it went offline...
Read more >
Threadpool Wait - sql server
The first thing that you would want to do is to find out which queries are consuming the maximum amount of CPU. This...
Read more >
sys.dm_os_wait_stats (Transact-SQL) - SQL Server
Indicates that the database mirroring worker task is waiting for more work. DBMIRRORING_CMD, Occurs when a task is waiting for log records to...
Read more >
Boost SQL Server Performance with Wait Statistics
WRITELOG wait type indicates the elapsed time when the log records writing into the disk. The possible causes can be as below: Locate...
Read more >
Airbyte Server unable to start after configuring an external ...
Hi all, I am running Airbyte locally (hosted on a VM on GCP) and would like to set-up an external database backend for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found