Consider adding a memory limit on the systemd service file.
[Unit]
Description=Dispenser
After=docker.service
BindsTo=docker.service
StartLimitIntervalSec=0
[Service]
MemoryMax=250M
Type=simple
Restart=always
RestartSec=1
User=dispenser
Environment="RUST_LOG=info"
ExecStart=/usr/local/bin/dispenser --config /opt/dispenser/dispenser.toml
ExecReload=/bin/kill -HUP $MAINPID
WorkingDirectory=/opt/dispenser
[Install]
WantedBy=multi-user.target
Or adding another method to limit the memory usage of the service.
Consider adding a memory limit on the systemd service file.
Or adding another method to limit the memory usage of the service.