[MXS-4368] Detect if maxscale is running inside a container and either warn about it or refuse to start to avoid memory and threads overallocation Created: 2022-10-25  Updated: 2023-10-17  Resolved: 2022-10-25

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 2.4.12
Fix Version/s: 22.08.0

Type: Task Priority: Major
Reporter: Claudio Nanni Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MXS-4155 MaxScale needs to detect it is runnin... Closed
Relates
relates to MXS-4154 MaxScale Memory Leak in Container Closed

 Description   

A container with 512MB Starts with 60GB qcc because the host has 380GB.

static int64_t DEFAULT_QC_CACHE_SIZE = get_total_memory() * 0.15;

It seems possible to determine from inside if a process it's running inside a container.
Not sure if it's possible to get the allowed resources for auto sizing.

In this case auto sizing is dangerous and can lead to memory problems.

Ideally MaxScale should either demand explicit settings for the autosized ones, warn or refuse to start.



 Comments   
Comment by Johan Wikman [ 2022-10-25 ]

Fixed by MXS-4155.

In 22.08.2 the information is also exposed.

Generated at Thu Feb 08 04:28:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.