Hi all,
Is there something funky I have to do to change the maxmemory parameter when using Ignition Cloud Edition? I can change it just fine on a "standard" version of Ignition but no matter what I do on the Amazon EC2 instance the memory seems to be fixed at 50%.
I've also examined the running process and for some reason it does seem to default to 50% but I can't find where it's being set...
This is a result of ps -ef
ignition 27560 1 0 May07 ? 00:23:57 /usr/local/bin/ignition/./ignition-gateway /usr/local/bin/ignition/data/ignition.conf wrapper.syslog.ident=Ignition-Gateway wrapper.pidfile=/usr/local/bin/ignition/./Ignition-Gateway.pid wrapper.daemonize=TRUE wrapper.name=Ignition-Gateway wrapper.displayname=Ignition-Gateway wrapper.statusfile=/usr/local/bin/ignition/./Ignition-Gateway.status wrapper.java.statusfile=/usr/local/bin/ignition/./Ignition-Gateway.java.status wrapper.script.version=3.5.42 wrapper.java.initmemory=0 wrapper.java.maxmemory=0 wrapper.java.initmemory.percent=50 wrapper.java.maxmemory.percent=50
In ignition.conf I have set
Initial Java Heap Size (in MB)
wrapper.java.initmemory=1024
Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=3072
@kcollins1 do you know how this works in Cloud Edition?
There are some extra bits in Ignition Cloud Edition that facilitate driving Ignition memory settings based on a percentage of total system memory. This is done via systemd service configuration, which is what allows it to continue to take effect independently of a restored GWBK or other modifications to data/ignition.conf. The goal being that you can change your instance size to increase memory and have Ignition scale up its usage automatically.
The memory percentages increase as total system memory increases as well--with a 4GiB instance, it is going to use 50%. Once you go past 16GiB, it uses a 85% max heap setting.
You can tune this yourself by creating a systemd override file at /etc/systemd/system/Ignition-Gateway.service.d/01-custom.conf with contents like below (this example sets memory percentage to 60%):
[Service]
# Setting ExecStart= to blank like below cancels out base ExecStart definitions in the main service file[s]
ExecStart=
ExecStart=/usr/local/bin/ignition-entrypoint.sh -v -m 60
Once you create this file, don't forget to systemctl daemon-reload before you systemctl restart Ignition-Gateway.service. For more information and a guided walk-through, take a look at this:

I'll look into working with our docs team to get something into our Cloud Edition docs for this.
2 Likes
Fantastic - thanks for this info - got it working as we wanted 
1 Like
Is this something that should be done in response to server memory issues? I’m currently experiencing a problem where I have a Cloud Edition VM on Azure that is running out of memory every 4 days or so. Once it’s rebooted, it will be fine, but over time memory usage gradually goes up. In the Ignition Gateway, it’s showing your standard “sawtooth” memory pattern where the peaks are well below max. Usage inside the java heap will peak to about 20g out of 27g max, and drop to 5g or so. No issues with extra long running tasks. CPU usage has occasional spikes to 50% (maybe a few times a day), but otherwise stays under 2%. Total system memory is 32 GiB. Max Java heap is 27 GiB, which is 85% like you said.
The only thing I think the IT company has installed on it is Sentinel, but they insist that can’t be the problem.