GitLab CI "Job's log exceeded limit of 4194304 bytes": how to fix it
Short answer
"Job's log exceeded limit of 4194304 bytes. Job execution will continue but no more output will be collected." means the runner stopped sending the job's output to GitLab at its output_limit, 4096 KB by default. The job keeps running and passes or fails as usual, but the rest of its log is gone. On a runner you manage, raise output_limit, in kilobytes, in the [[runners]] section of config.toml; the runner picks it up within seconds. GitLab has its own limit too, 100 MB per job log by default, and past it GitLab fails the job with "The job log size limit was reached". On GitLab.com's hosted runners, make the job quieter, or write its output to a file and save it as an artifact.
A job’s log stops partway through, with this in yellow:
Job's log exceeded limit of 4194304 bytes.
Job execution will continue but no more output will be collected.
The runner sent the first 4 MB of the job’s output to GitLab and then stopped sending. Here’s what that means in GitLab 19.5, how to raise the limit, and how to keep logs short.
Two limits
| Limit | Default | When it’s hit |
|---|---|---|
The runner’s output_limit |
4096 KB, which is 4,194,304 bytes | The job keeps running; the rest of its log is lost |
| GitLab’s job log limit | 100 MB | GitLab fails the job: “The job log size limit was reached” |
The runner’s limit is the one you usually see. The job’s result doesn’t change: it passes or fails as it would have, and its artifacts and reports still upload. Only the output after the limit is gone, including any error printed after that point.
Raise the runner’s limit
On a runner you manage, set output_limit, in kilobytes, in the runner’s [[runners]] section of config.toml:
[[runners]]
name = "my-runner"
url = "https://gitlab.com/"
output_limit = 16384
That’s 16 MB. The runner checks config.toml for changes every 3 seconds, so new jobs pick it up without a restart. Each runner has its own setting, so change every runner that runs the job.
GitLab’s own limit, 100 MB per job log by default, stays above that. On GitLab Self-Managed, an administrator can change it with ci_jobs_trace_size_limit in the Rails console.
On GitLab.com’s hosted runners you can’t change the runner’s configuration: shorten the output instead.
Keep logs short
Big logs usually come from download progress, verbose test reporters, and debug logging:
-
Turn off debug logging.
CI_DEBUG_TRACE: "true"prints every command and variable, and fills the log fast. -
Use quiet flags:
Tool Quieter Maven --batch-mode --no-transfer-progressGradle --quietpip --quiet --progress-bar offapt-get -qqnpm --loglevel=errorcurl --silent --show-errordocker build--quiet -
Report only failures from test runners that print every passing test.
Save the full output as an artifact
Write the noisy step’s output to a file, print its end only when it fails, and keep the file:
build:
script:
- ./build.sh > build.log 2>&1 || (tail -n 200 build.log; exit 1)
artifacts:
when: always
paths:
- build.log
expire_in: 1 week
when: always keeps the file when the job fails too, though not when it times out. Download it from the job’s page, under Job artifacts. If the file doesn’t show up, see GitLab CI artifacts not found.
The output past the limit never reached GitLab, so the job’s raw log is cut off in the same place: a truncated job has to run again, with a higher limit or less output, to show the rest.
On your phone
MergeBell shows a job’s log live, so the Job's log exceeded limit line is there as soon as the runner writes it, and Retry reruns the job on the free tier. A retry runs the same commit with the same output, so quieter flags or a log artifact need a new commit; a raised output_limit on your own runner works for the retry. More in how to retry a failed GitLab pipeline.
Frequently asked questions
What does "Job's log exceeded limit of 4194304 bytes" mean in GitLab CI?
The runner sent the job's first 4,194,304 bytes of output, 4 MB, which is its default output_limit of 4096 KB, and then stopped sending more. The job keeps running and passes or fails as usual; only the rest of its log is lost.
How do I increase the GitLab CI job log size limit?
On a runner you manage, set output_limit in kilobytes in the runner's [[runners]] section of config.toml, such as output_limit = 16384 for 16 MB. The runner reloads config.toml within seconds. GitLab's own limit, 100 MB per job log by default, is above that; on GitLab Self-Managed, an administrator can change it with ci_jobs_trace_size_limit in the Rails console.
Does a GitLab job fail when its log is too long?
Not at the runner's limit: the job continues and only the output stops. At GitLab's own limit, 100 MB by default, GitLab fails the job with the reason "The job log size limit was reached".
How can I see the full output of a GitLab job with a truncated log?
The missing output never reached GitLab, so the raw log is truncated too, and a plain retry stops at the same point. Change the job to redirect its output to a file, such as make build > build.log 2>&1, save that file with artifacts: when: always, and run a new pipeline; then download the file from the job page.
Can I raise the job log limit on GitLab.com's hosted runners?
No. GitLab manages those runners' configuration. Make the job's output shorter, such as with quiet flags and without CI_DEBUG_TRACE, or write the noisy part to a file and save it as an artifact.
Sources
- GitLab Runner docs — the [[runners]] section (output_limit)
- GitLab docs — Maximum file size for job logs
- GitLab docs — Job artifacts (artifacts:when)
- GitLab Runner source — the log limit message (buffer.go)
- GitLab docs — Debug logging (CI_DEBUG_TRACE)
Checked against these pages on 12 November 2026. GitLab changes quickly — if something here no longer matches, tell us and we will fix it.
Do this from your phone with MergeBell
Free for the whole review loop: the To-Do inbox, diffs and line comments, approve and merge, pipelines with retry, and push alerts for your To-Dos. Works with gitlab.com and self-managed GitLab 16.0+.
Get MergeBell for iPhoneGet MergeBell for Android
On the App Store for iOS 26 or later and on Google Play for Android 12 or later. An independent app, not affiliated with GitLab Inc.