Skip to content

Environment Variables

Giantpizzahead edited this page Aug 11, 2020 · 2 revisions

This page contains a comprehensive list of the configuration settings available (changed using environment variables). The parentheses to the right of each environment variable name indicates its default value. Use the -e flag when running the Docker container to set environment variables.

Debug Outputs

DEBUG (0)

Enables / disables debug outputs (0 for off, 1 for on).

DEBUG_LOW (0)

Enables / disables very verbose debug outputs (0 for off, 1 for on).

DEBUG_LOWEST (0)

Enables / disables the most verbose of verbose debug outputs (0 for off, 1 for on). Warning: Lots of text!

PROGRAM_OUTPUT (0)

Enables / disables adding the first X bytes of stdout and stderr to the response. Only shows in the debug log. This value should be an integer in the range 0-256 (to prevent huge amounts of output).

Program Compilation

COMPILE_TIME_LIMIT (10)

Time limit while compiling a program (in seconds). Rounded to 1 decimal place.

COMPILE_MEMORY_LIMIT (256)

Memory limit while compiling a program (in MB). Must be an integer.

COMPILE_ERROR_OUTPUT (512)

Outputs the first X bytes of a compile error to the person who submitted the program. This value should be an integer in the range 0-512 (to prevent huge amounts of output).

MAX_COMPILE_SIZE (16)

Maximum size of the final executable (in MB). Must be an integer.

Program Execution

MAX_TIME_LIMIT (5)

Maximum possible time limit for programs (in seconds). Rounded to 1 decimal place. Note that the actual time limit for a program is set by the info.yml file for each individual problem. This variable simply caps the allowed time limit (if the info.yml says the time limit should be 999 seconds, this environment variable will force the time limit to 5 seconds).

MAX_MEMORY_LIMIT (256)

Maximum possible memory limit for programs (in MB). Must be an integer. Note that the actual memory limit for a program is set by the info.yml file for each individual problem.

JAVA_TIME_MULTIPLIER (1.5)

Time limit adjustment for Java (base time limit will be multiplied by this). Rounded to 1 decimal place.

PYTHON_TIME_MULTIPLIER (2)

Time limit adjustment for Python (base time limit will be multiplied by this). Rounded to 1 decimal place.

MAX_OUTPUT_SIZE (16)

Max file size that the program can create (including stdout and stderr) in MB. Must be an integer.

WALL_TIME_EXTENSION (1.5)

Number of seconds to add to the wall time threshold (used to kill a program that runs for too long). Rounded to 1 decimal place.

Web Server (gunicorn)

WORKER_COUNT (1)

Number of workers for gunicorn to use.

THREAD_COUNT (2)

Number of threads for gunicorn to use.

MAX_CODE_SIZE (256)

Max code file size allowed, in KILOBYTES (KB)!!!!! Must be an integer.

Miscellaneous

WEBHOOK_URL (None)

The webhook URL (a POST request will be sent here after processing a submission). See the Webhook Usage wiki page for more details.

RESULT_TTL (2000000000)

How long to keep the results of jobs (in seconds). Applies to both failed and successful jobs. Defaults to basically forever.

PROBLEM_INFO_PATH

The path to the problem_info folder. Defaults to "/problem_info" if that directory path exists; if it doesn't, then it uses "./sample_problem_info" instead.

SECRET_KEY

The secret key used to authenticate to JudgeLite. Defaults to a random string of 24 alphanumeric characters.

PAGE_SIZE (50)

The page size for the submission list API call.