memory exhausted (scan.php)
-
In scan.php line 3.7.3 causes memory exhaustion:
file_put_contents( NSCAN_TMP_SNAPSHOT, serialize( $snapshot ) );
I think
serialize
is still problematic.
Also not the whole snapshot should be saved at once. It should be one line per entry and maybejson_encode
. See also my previous threads regarding possible improvements.The error happened after the NinjaScanner and NinjaFirewall plugins were installed (and a file manager) so it was caused by too many new files / changes. It also happens when the relevant scan folder is deleted in wp-content/ninjascanner.
The actual error messages:
Allowed memory size of 134217728 bytes exhausted (tried to allocate 1744455 bytes)
05-Feb-22 22:13:22 ERROR Error: E_ERROR (Allowed memory size of 134217728 bytes exhausted (tried to allocate 1744455 bytes) - line 373 in /www/htdocs/wp-content/plugins/ninjascanner/lib/scan.php)
- The topic ‘memory exhausted (scan.php)’ is closed to new replies.