# fly logs stops showing new lines after a few seconds, but fly logs --no-tail has them

**URL:** <https://community.fly.io/t/fly-logs-stops-showing-new-lines-after-a-few-seconds-but-fly-logs-no-tail-has-them/28908>\
**Category:** Questions / Help\
**Tags:** logs\
**Created:** [October 23, 2026, 7:27pm UTC](https://community.fly.io/t/fly-logs-stops-showing-new-lines-after-a-few-seconds-but-fly-logs-no-tail-has-them/28908 "2026-10-23T19:27:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pibble](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@pibble](https://community.fly.io/u/pibble)\
**Post date:** [October 23, 2026, 7:27pm UTC](https://community.fly.io/t/fly-logs-stops-showing-new-lines-after-a-few-seconds-but-fly-logs-no-tail-has-them/28908/1 "2026-10-23T19:27:23Z")

</div>

flyctl v0.4.118, darwin/arm64, app in fra.

To reproduce, tail an app’s logs, then start a Machine that prints one line a second for a minute:

```auto
LOG_LEVEL=debug fly logs -a <app> --json

fly machine run alpine:3 -a <app> --region fra --restart no --rm --detach -- \
  sh -c 'for i in $(seq 1 60); do echo tick $i; sleep 1; done'

```

I tried this three times today. The tail showed ticks 1 to 17 the first time, 1 to 9 the second, and none the third. Each time the `fly logs` process kept running and printed nothing more. `fly logs --no-tail` straight after showed all 60 ticks.

The debug output from the third try shows flyctl polling `GET /api/v1/apps/<app>/logs?next_token=1792783284795362836` about every 6 seconds. Every answer was `{"data":[],"meta":{"next_token":""}}`. About two minutes after the Machine finished, I sent the same request with the same `next_token` by hand and got 74 entries, the ticks among them. So the lines were stored, but the API returned nothing for that position while the tail was asking.

In longer sessions, `fly logs` also exits on its own every 8 minutes or so, with exit code 0 and no message.

For now we poll `fly logs --no-tail` every 10 seconds and drop lines we’ve already seen. This may be the same problem as [fly logs hangs periodically · Issue #515 · superfly/flyctl · GitHub](https://github.com/superfly/flyctl/issues/515).

---

<div class="post-metadata">

**Author:** ![flyio-support](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/flyio-support/32/46245_2.png) [@flyio-support](https://community.fly.io/u/flyio-support)\
**Post date:** [October 23, 2026, 8:51pm UTC](https://community.fly.io/t/fly-logs-stops-showing-new-lines-after-a-few-seconds-but-fly-logs-no-tail-has-them/28908/2 "2026-10-23T20:51:26Z")

</div>

Hi, I just tried this repro and in my case it didn’t miss a beat (or should I say a tick?). Is there something else at play? network shenanigans? something? (for completeness, I’m in Canada and I even used a machine in fra, same as your region - so even transatlantically, it works fine for me).

---

<div class="post-metadata">

**Author:** ![Mrlaura](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/mrlaura/32/51207_2.png) [@Mrlaura](https://community.fly.io/u/Mrlaura)\
**Post date:** [October 28, 2026, 2:42am UTC](https://community.fly.io/t/fly-logs-stops-showing-new-lines-after-a-few-seconds-but-fly-logs-no-tail-has-them/28908/3 "2026-10-28T02:42:04Z")

</div>

Hmm, the part about the same `next_token` returning empty results and then showing 74 entries later is pretty interesting.

I wonder if this is more of a cursor or log availability issue than a network problem.

I’m not entirely sure how the logs API handles empty responses, but maybe the client is treating an empty `next_token` as a reason to stop advancing, even when more logs become available later.

One thing I’d be curious about is whether the behavior changes when the polling interval is longer. If it does, that might point to a timing issue between log ingestion and the API rather than the connection itself.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [November 7, 2026, 2:42am UTC](https://community.fly.io/t/fly-logs-stops-showing-new-lines-after-a-few-seconds-but-fly-logs-no-tail-has-them/28908/4 "2026-11-07T02:42:37Z")

</div>

Closed on November 7, 2026, 2:42am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
