• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] STDOUT logging when container is started with -I and some CMD
#1
Hi Armin,

I ran into an issue where the netPi stopped working and the SD-card was completely full. I assume it was because STDOUT and STDERR are logged when a container is started with interactive shell and a CMD which writes to STDOUT and STDERR. The logs can be accessed through portainer, container details. Is there a possibility to clear the logs or to limit the size of the log-files when the container is created?
I had to delete and recreate the container to get it up and running again. It might be desirable to have the logs, but the netPi should not stop working because of it. Especially not when running in an industrial application.

Best regards
Thomas
  Reply
#2
Hello Thomas,

interesting aspect. We have never thought about an issue that a docker logging file could produce an issue.

At the current stage I even don't know if a container really stops working in the case the SD card is getting full, but I trust your experience cause I don't have any life example of a container doing the same.

Today there is no possibility I see no possibility to disable this logging mechanism. I agree that this is getting critical in case a container really stops its operation.

Since in a container it is still under you control what is sent to the STDOUT, I would recommend to insert an environment variable "DEBUG" for example and test in all echoing applications you are running the existence of it to decide whether or not to output data on STDOUT. Other methods I don't see right now.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply
#3
With netPI firmware V1.1.3.0RC3 this problem is solved and the log file is limited to a size of 1Mbyte now.
You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  TOSILOCK for CONTAINER COswald 3 2,182 July-13th-2021, 11:32 AM
Last Post: Armin@netPI
  Access to RTC from my own container application tad 1 3,519 March-19th-2021, 02:58 PM
Last Post: Armin@netPI
  [SOLVED] Starting services/commands/scripts at startup of a container Jonas.Sellmann@outlook.de 9 6,011 March-9th-2021, 08:47 AM
Last Post: WalterSchaefer
  Getting started on the netPI 217004326 1 1,766 February-9th-2021, 01:16 PM
Last Post: Armin@netPI
  OpenVPN container Armin@netPI 0 1,612 January-3rd-2021, 12:13 PM
Last Post: Armin@netPI
  operating Console of a container on netPI connected to Wi-Fi tethering tad 3 2,611 December-3rd-2020, 12:32 PM
Last Post: tad
  NIOT-E-NPIX-4DI4DO with netpi-netx container WalterSchaefer 3 6,471 November-25th-2020, 01:06 PM
Last Post: zen89
  NPIX-4DI4DO and NetPi-Nodered container issues alhammi 4 7,580 November-16th-2020, 01:35 PM
Last Post: alhammi
  Get host MAC via REST API inside container bschandra 4 3,640 November-16th-2020, 09:26 AM
Last Post: bschandra
  Exporting and importing container images Armin@netPI 3 3,061 May-20th-2020, 11:24 AM
Last Post: COswald

Forum Jump:


Users browsing this thread: 1 Guest(s)