# One CSS warning, 450,000 times: how a log flood jammed my only CI runner

> After adding a native CSS carousel (::scroll-marker) to the home page, GitHub Actions queued for up to an hour. Tests finished in 7 minutes; one CSS parsing warning printed 450,000 times, 15 million log lines.

- Date: 2026-11-29
- Topics: DevOps, CSS, Next.js
- Chinese original: https://kbs0830.com/blog/css-warning-flooded-ci-runner

This site's CI runs on my own desktop: a single self-hosted runner, with two workflows triggered by every push, "deploy" and "E2E tests". The runner can only run one job at a time, so normally things queue up for a bit and clear within a few minutes.

On the afternoon of 11/28 the queue suddenly grew to an hour. Several commits' deploys sat in `queued`, and every E2E ahead of them ran for nearly 60 minutes before ending, and failed.

## First: is a test hanging?

My instinct was that some test was stuck waiting for a timeout. I pulled the log of one run:

```bash
gh run view <run-id> --log > e2e.log
wc -l e2e.log
# 15093260
```

**15 million lines.** A normal E2E log is a few thousand lines.

Then the timeline:

| Time | Event |
|---|---|
| 12:06:26 | Playwright starts |
| 12:13:55 | `168 passed (5.7m)`, 1 failure, process ends |
| 12:41:08 | the job is finally marked complete |

The tests finished in 7.5 minutes. **For the 27 minutes after that, the runner was processing the log.** It could do nothing else during that time, and every deploy behind it queued.

## What the 15 million lines were

```bash
grep -c "Parsing CSS source code failed" e2e.log
# 457323
```

Almost all one warning, coming from the `next dev` that E2E starts:

```
Warning: Parsing CSS source code failed
> 4049 |   .post-carousel [data-marker]::scroll-marker:focus-visible {
'scroll-marker' is not recognized as a valid pseudo-element.
```

That morning I had just added a mobile carousel of "latest posts" to the home page using the native CSS carousel: `::scroll-marker-group` and `::scroll-marker` let the browser draw the dots underneath itself, with zero JavaScript. Chrome supports them, but Lightning CSS, which Next.js uses to process CSS, **does not recognize these two pseudo-elements yet**.

In a production build it warns once and still outputs the rules, so the dots on the site were fine, and I noticed nothing while verifying. But `next dev` is different: every time it processes `globals.css` it prints the warning, with a few lines of source each time. With E2E running 170-odd tests and 3 workers constantly requesting pages, that added up to 450,000 prints.

## The fix

**1. Keep Lightning CSS away from those rules.** I moved the carousel dot CSS out of `globals.css` and into the component, written as a string in a React 19 `<style>`:

```tsx
const CAROUSEL_MARKERS = `@media (width < 640px) {
  .post-carousel::scroll-marker-group { display: flex; justify-content: center; gap: 4px; }
  .post-carousel [data-marker]::scroll-marker { /* the dots */ }
  .post-carousel [data-marker]::scroll-marker:target-current { /* the current post */ }
}`;

<style href="post-carousel-markers" precedence="default">{CAROUSEL_MARKERS}</style>
```

`href` with `precedence` makes React hoist it into `<head>`, with only one copy per page. A string does not go through the CSS pipeline, so there is no warning. After the change, the CSS warnings in the build output went from 1 to 0, and the dots on phones display as before.

**2. Make sure one job can never jam CI again.** With a single runner, queueing itself cannot be avoided, but it can queue meaningfully:

```yaml
# e2e.yml: only the latest commit's result matters, so a new push cancels the old run
concurrency:
  group: e2e-main
  cancel-in-progress: true

# deploy.yml: never cancel one that is running; of the queued ones keep only the latest (deploy starts with git pull, so no commit is missed)
concurrency:
  group: deploy-main
  cancel-in-progress: false
```

Both jobs also got `timeout-minutes: 30`. GitHub's default limit is 6 hours, and a stuck job could hold the runner all afternoon.

## What I learned

- **Slow CI is not necessarily slow tests.** Compare the "tests finished" time with the "job finished" time; a big gap means log processing.
- **Log line count is a good alarm.** Run `wc -l`; if it jumps from a few thousand to millions, something is flooding it.
- **A clean build does not mean a clean dev server.** The same warning prints once in a build and on every processing pass in dev. CI's E2E runs on dev.
- **The toolchain may not keep up with new CSS features.** The browser supports them, but processors like Lightning CSS or PostCSS may not yet. In that case you can let those rules bypass the processing pipeline.

---

Author: PINGWEI LI (李秉威, Li Ping-Wei)
Original page: https://kbs0830.com/en/blog/css-warning-flooded-ci-runner
