question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

container logs are truncated

See original GitHub issue

Environment summary

Ubuntu 16.04 64-bit installed with apt az version 2.0.23

I have a CLI program that outputs JSON to stdout. I created a container that outputs over 36000 characters of JSON onto a single line When I run az container logs -g my-rg -n my-cg --container-name my-container It only returns the last ~2200 characters. I ran the same container in ACS and verified that it wasn’t anything wrong with the container

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mmacycommented, Jan 4, 2018

I can get, at most, 8193 bytes back for a single line with the az container logs command. I have a test image that sends 1,024,000 characters to STDOUT, and while a local instance of the container yields all output via docker logs, only 8193 bytes are returned from ACI.

Example output (same image):

marsma@marsma-02:~/aci/container_images/output-test$ docker logs eloquent_bose | wc --bytes
1024000
marsma@marsma-02:~/aci/container_images/output-test$ az container logs --resource-group rg604 --name out1mb | wc --bytes
8193
1reaction
Stephanvscommented, Jan 27, 2021

I can report that we just ran into the same problem, so it still does not appear solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solving truncated Azure Container Instance logs
The problem with it is that the logs in Azure Container Instances are being truncated and that is an open issue ever since...
Read more >
DevOps: Truncate Docker container logs periodically to free ...
I've been disturbed by having my services unavailable on my machine because of “no space left on device”. Every time I was forced...
Read more >
Truncated Log Events - Docker Community Forums
I have run a tcpdump on the docker host and observed that the message leaving the container and arriving in fluentd is a...
Read more >
How to Clear Log Files of A Docker Container - TecAdmin
Clear Docker Container Log File · Option 1: In this option, first we will find the log file path and then truncate it....
Read more >
How to clear the logs properly for a Docker container?
If this is not a production environment, then I'd say it would be safe to simply stop the container, truncate the log, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found