> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/continuous-delivery/use-continuous-delivery/manage-deployments/deployment-logs-and-limitations.md).

# Deployment logs and limitations

This topic lists deployment log size, export, and viewing limits.

Harness deployment logging has the following limitations.

## What you will learn from this topic

* How to review [log size limits](#log-size-limits)
* How to review [viewing limits](#viewing-limits)
* Understand [real-time log display behavior](#real-time-log-display-behavior)

## Log size limits <a href="#log-size-limits" id="log-size-limits"></a>

The following table shows the log size limits for different Harness modules:

| Limit Type                    | CI Module | Other Modules (CD, CCM, etc.) |
| ----------------------------- | --------- | ----------------------------- |
| **Total log size per step**   | 5MB       | 25MB                          |
| **Maximum size per log line** | 70KB      | 25KB                          |

### Log truncation behavior <a href="#log-truncation-behavior" id="log-truncation-behavior"></a>

Harness applies the following truncation behavior when logs exceed the size limit:

* When logs exceed the size limit, Harness truncates the oldest log lines and retains the newest ones.
* You can export full CI logs to an external cache. For information about CI log limits and exporting CI logs, go to [Truncated execution logs](https://developer.harness.io/continuous-integration/troubleshooting-and-resources/ci-articles-and-faqs/continuous-integration-faqs#truncated-execution-logs).

## Viewing limits <a href="#viewing-limits" id="viewing-limits"></a>

The following viewing limits apply to logs in the Harness UI:

* **Line limit**: The Harness log service has a 5,000-line limit. Logs rendered in the Harness UI are truncated at the top if they exceed the 5,000-line limit.

{% hint style="info" %}
If you need more than 5,000 log lines, contact [Harness Support](mailto:support@harness.io).
{% endhint %}

* **Step runtime limit**: Steps exceeding 5 hours may experience log visibility issues. Harness is working to address this limitation.

## Real-time log display behavior <a href="#real-time-log-display-behavior" id="real-time-log-display-behavior"></a>

When running pipelines, you may notice differences between the real-time log display and the complete logs available after step completion:

### Initial display limitation <a href="#initial-display-limitation" id="initial-display-limitation"></a>

During pipeline execution, the following behavior applies to the initial log display:

* During step execution, the initial log display shows approximately 10,000 lines in real-time.
* The complete log becomes visible after the page is refreshed once the step is complete.
* This behavior is by design and does not affect the execution of your steps.

### Log batching optimization <a href="#log-batching-optimization" id="log-batching-optimization"></a>

The log system uses batching to optimize log storage and display:

* The 5,000-line limit applies at the step level, per request.
* Log batching allows multiple log lines in a single message, effectively increasing the total number of lines stored.
* Logs are flushed every second from the delegate to the log service.
* The batch size depends on how many logs the step produces within that flush interval.
* If a task produces more log lines than the configured limit within 100ms, older logs from that batch may be truncated.

### Expected behavior <a href="#expected-behavior" id="expected-behavior"></a>

You can expect the following behavior when working with logs:

* **Real-time monitoring**: During execution, you might see fewer lines than actually generated, or notice a mismatch between log line numbers and displayed content.
* **Post-execution**: The full log output becomes available after the step completes and the page refreshes.
* **Log line count**: The total number of visible log lines varies with the log generation rate and batching behavior.

### Best practices <a href="#best-practices" id="best-practices"></a>

To work effectively with log display behavior:

* For critical log analysis, wait for the step to complete, then refresh the page to view the complete logs.
* Consider breaking down steps that generate excessive logs into smaller tasks.
* Add identifiers or markers to log lines to make them searchable.
* If you notice missing logs during real-time monitoring, refresh the page after step completion to view the full output.

## Next steps

* Go to [Truncated execution logs](https://developer.harness.io/continuous-integration/troubleshooting-and-resources/ci-articles-and-faqs/continuous-integration-faqs#truncated-execution-logs) to review how to export full CI logs to an external cache.

{% @harness-feedback/feedback %}
