Debug

The debugging settings can help to find and solve issues with the datarhei Core.

Configuration

{
   "debug": {
      "profiling": false,
      "force_gc": 0,
      "memory_limit_mbytes": 0,
   }
}

profiling (bool)

By setting this to true, the endpoint /profiling will be established where you can access different diagnostic solutions as described in https://go.dev/doc/diagnostics.

By default this setting is set to false.

force_gc (integer)

Golang is usually quite greedy when it comes to claim memory to itself. This settings lets you define the number of seconds between forcing the garbage collector to run in order return memory to the OS. If this is not set, the runtime will decide on its own when to run the garbage collector.

Alternatively, you can set the environment variable GOMEMLIMIT to a value in bytes in order to set a soft memory limit. This will influence the garbage colltector when the consumed memory comes close to this limit. If you use the GOMEMLIMIT environment variable you are advised to leave the force_gc option disabled.

The default for this setting is 0 (i.e. disabled).

memory_limit_mbytes (integer)

As of version 16.12.0 use this valuess to impose a soft limit to the memory consumption of the Core application itselft (i.e. with out the memory consumption of the ffmpeg processes). This has the same effect as setting the GOMEMLIMIT environment variable.

The provided value is the number of megabytes the Core application is allowed to consumed.

The default for this setting is 0 (i.e. no limit).

Last updated