• 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
  [SOLVED] activate LED1/2 with Node-RED + fieldbus nodes container Christian_Rau 6 88 October-21st-2019, 10:30 AM
Last Post: Armin@netPI
  Cannot start container Magnus 7 34 October-16th-2019, 01:00 PM
Last Post: Armin@netPI
  Generate VLAN interfaces in container FrankJacob 7 44 September-26th-2019, 03:19 PM
Last Post: Armin@netPI
  create container in Portainer v1.12.4 dcatteeu 2 23 September-9th-2019, 12:12 PM
Last Post: dcatteeu
  UMTS/LTE support via USB router/modem sticks in a container Armin@netPI 3 153 September-5th-2019, 02:07 PM
Last Post: Armin@netPI
  Exporting and importing container images Armin@netPI 0 23 August-23rd-2019, 10:39 AM
Last Post: Armin@netPI
  Ready-to-deploy: full featured Node-RED container Armin@netPI 5 77 July-25th-2019, 06:16 AM
Last Post: Armin@netPI
  New Container example "OPC UA server" Armin@netPI 0 17 April-12th-2019, 11:51 AM
Last Post: Armin@netPI
  Official Node-RED container Armin@netPI 0 19 April-5th-2019, 10:39 AM
Last Post: Armin@netPI
  Multi-stage builds for slim container images Armin@netPI 0 10 February-7th-2019, 04:14 PM
Last Post: Armin@netPI

Forum Jump:


Users browsing this thread: 1 Guest(s)