[MDEV-30762] Memory Limit reached causes mariadb server restart Created: 2023-03-01  Updated: 2023-09-07

Status: Open
Project: MariaDB Server
Component/s: Configuration
Fix Version/s: None

Type: Task Priority: Major
Reporter: Jan Bludau Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-24670 avoid OOM by linux kernel co-operativ... Closed

 Description   

The configuration looks like this:

systemctl edit mariadb.service

add the following for example

 
systemctl edit mariadb.service
 
[Service]
MemoryMax=18000M
MemorySwapMax=750M
 
 
systemctl daemon-reload
 
or vi(m) / nano
 
nano /etc/systemd/system/mariadb.service.d/override.conf

If the memory limit is reached, the server crashes and restarts.

This memory limit behaves as if there was no more memory available on the system.

Could memory drain intelligence be improved?



 Comments   
Comment by Michael Widenius [ 2023-09-07 ]

Yes, MariaDB needs to have better checks for out-of-memory conditions.
In case of bigger allocations, MariaDB will detect that and give an error to end user.
However if one cannot allocate any memory even for small things, then MariaDB may crash.
This is something we have to improve over time.

Generated at Thu Feb 08 10:18:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.