I tried reducing opcache.memory_consumption from 512->400 but still received the memory exhaustion error the next day.
[19-Jul-2018 15:29:52 ] PHP Warning: A non-numeric value encountered in aaaa\grade\report\grader\lib.php on line 489
[19-Jul-2018 15:39:50 ] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in aaaa\cache\stores\static\lib.php on line 261
[19-Jul-2018 15:39:50 ] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes) in aaaa\lib\classes\session\database.php on line 232
[19-Jul-2018 15:39:50 ] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in Unknown on line 0
[19-Jul-2018 15:39:50 ] PHP Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
[19-Jul-2018 15:40:23 ] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in aaaa\cache\stores\static\lib.php on line 261
[19-Jul-2018 15:40:23 ] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 49152 bytes) in aaaa\lib\classes\session\database.php on line 232
[19-Jul-2018 15:40:23 ] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 24576 bytes) in Unknown on line 0
[19-Jul-2018 15:40:23 ] PHP Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
I noticed one other setting related to opcache that should be updated, max_accelerated_files, currently its 8000, our moodle installation has 18760 files so I believe the value should be increased to 18000 according to documentation guidelines. Probably unrelated to the errors but Ill update it anyways.
Next steps look like the following, although I am skeptical at this point they will help,
1] session to disk rather than DB
2] increase max_memory , 512->800 (does anyone think this is just a runaway script (memory leak) and not a php issue?)