mod_fcgid, stderr, PHP Fatal error, Allowed memory size exhausted

mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) …

I have plenty of RAM and would like to allocate more for a particular site. I’m experiencing 500 errors occasionally where I get no output (no content, white page), and seems to be occurring with more frequency. This was the recurring error in the Apache Error Log. The error is occurring when very large arrays are being manipulated. The server only hosts two domains anyway, and one is just a redirect from old domain name to new domain name. I say this because if the answer is to increase globally that would be a fine solution too.

I’ve attempted to increase memory limits in these files via Virtualmin:/home/

but still reading same error in apache2 log. I did verify this is the version of PHP that is selected for the domain.

I’m sure I’m overlooking something obvious. This isn’t a new problem and I have spent some time off and on again for the past few months trying to resolve it myself. I thought I had posted this days ago, but can’t find in the forum so trying again. Please let me know of any details I need to provide, and thank you so much for your time!

Operating System: Ubuntu 16.04.3 LTS
Kernel and CPU: Linux 4.4.0-112-generic on x86_64
Real memory: 1014.68 MB used / 3.77 GB total
Webmin version: 1.872
Usermin version: 1.734
Virtualmin version: 6.02
Authentic Theme: 19.09.2

After a fresh boot:
root@www:~# service apache2 status
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
Active: active (running) since Sun 2018-02-25 22:35:58 UTC; 2min 30s ago
Docs: man:systemd-sysv-generator(8)
Process: 449 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
Tasks: 11
Memory: 239.5M
CPU: 11.789s
CGroup: /system.slice/apache2.service
├─600 /usr/sbin/apache2 -k start
├─606 /usr/sbin/apache2 -k start
├─624 /usr/sbin/apache2 -k start
├─625 /usr/sbin/apache2 -k start
├─626 /usr/sbin/apache2 -k start
├─627 /usr/sbin/apache2 -k start
├─628 /usr/sbin/apache2 -k start
├─721 /usr/bin/php-cgi7.0
├─722 /usr/sbin/apache2 -k start
├─748 /usr/sbin/apache2 -k start
└─749 /usr/bin/php-cgi7.0

Feb 25 22:35:56 systemd[1]: Starting LSB: Apache2 web server…
Feb 25 22:35:56 apache2[449]: * Starting Apache httpd web server apache2
Feb 25 22:35:57 apache2[449]: [Sun Feb 25 22:35:57.194484 2018] [so:warn] [pid 537] AH01574: module dav_module is already loaded, skipping
Feb 25 22:35:58 apache2[449]: *
Feb 25 22:35:58 systemd[1]: Started LSB: Apache2 web server.