> 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

Harness deployment logging has the following limitations:

### 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>

* 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](/continuous-integration/troubleshooting-and-resources/ci-articles-and-faqs/continuous-integration-faqs.md#truncated-execution-logs).

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

* **Line limit**: The Harness log service has a limit of 5000 lines. Logs rendered in the Harness UI are truncated from the top if the logs exceed the 5000 line limit.

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

* **Step runtime limit**: Steps exceeding a 5-hour runtime may experience log visibility issues. We are 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 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 step execution, the initial log display shows approximately 10,000 lines in real-time
* The complete log becomes visible after refreshing the page 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 within each 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>

* **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 step completion and page refresh
* **Log line count**: The total number of visible log lines can vary depending on 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 step completion and refresh the page to view complete logs
* Consider breaking down steps that generate excessive logs into smaller tasks
* Add identifiers or markers to log lines to make them easily searchable
* If you notice missing logs during real-time monitoring, refresh the page after step completion to view the full output
