copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

`copilot svc logs ` has multiple minute delay

Open rynonl opened this issue 1 year ago • 2 comments

I am wanting to tail my AWS logs in my terminal, so I am using copilot svc logs. The logs eventually come, but at a 3-4+ minute delay. They show up in the AWS UI basically instantaneously.

Is this a known issue, or is there perhaps some configuration somewhere I should be looking at to eliminate this delay using the CLI?

rynonl avatar Aug 30 '24 17:08 rynonl

hello @rynonl. It's probably because you have too many log streams (each task create its own and they won't get deleted with a task's stop). You can run svc status to get running tasks and do the log again and filter by specific running task copilot svc logs --tasks xxx.

Alternatively you can use cloudwatch logs insight which i believe would be much nicer to use for some major use cases

iamhopaul123 avatar Aug 30 '24 20:08 iamhopaul123

Hmm, I'm only showing 1 running task so I think it's probably not that?

Service: web
Task Summary

  Running   ██████████  1/1 desired tasks are running
  Health    ██████████  1/1 passes HTTP health checks
            ██████████  1/1 passes container health checks

Tasks

  ID        Status      Revision    Started At      Cont. Health  HTTP Health
  --        ------      --------    ----------      ------------  -----------
  59a426f8  RUNNING     452         23 minutes ago  HEALTHY       HEALTHY

rynonl avatar Sep 03 '24 14:09 rynonl