Technical Tip: High memory usage of node process
| Description | This article describes the reason for high memory utilization in the node process. |
| Scope | FortiGate running v6.4.x, v7.0.x, v7.2.x and v7.4. |
| Solution | On v6.4, the node process is used for:
Processing all incoming HTTP/HTTPS to serve static files (before v7.0, the process HTTPSD served static files).
On v7.0, the 3 main node.js scripts on a FortiGate are for:
The security rating result submission is enabled by default on the FortiGate.
A high memory usage of the node process can be seen, for example, with commands:
diagnose sys top-mem
Example output from the 'diagnose sys top' command:
Version: FortiGate-400E v6.4.7,build1911,210825 (GA)
To disable the security rating functionality, execute the following command:
config system global
In some cases, it might be required to also disable the scheduled rating and restart the Node.js process:
config system global
In some cases, it might be required to also disable the scheduled rating and restart the Node.js process:
diagnose nodejs process restart <-- Before v7.0. fnsysctl killall node <-- v7.0 Onward.
In some cases, it might be required to remove a single node process:
diagnose sys process pidof node <--- Lists the pids of node processes running. diagnose sys kill 11 <pid number>
Running a 'killall' on a process can make the system unstable.
Another workaround suggested is to create an auto-script to periodically restart the node process, as shown below:
config system auto-script
This script will automatically restart the node process every 24 hours (86400 seconds), which may help prevent the device from entering conserve mode.
Note: The command 'set security-rating-result-submission' is not available anymore in v7.4.x. High memory consumption on the Node.js process is still being observed in FortiOS v7.4.9. The manual workaround to restart the process manually or with an automation stitch still can be applied or upgrade to FortiOS v7.4.11 or v7.6.6, which include following command to auto-restart Node.js process when detected high memory usage (the following command is hidden and does not display when running the command show).
config system global end
An additional logging option can be enabled usingthe below command for further investigation on the memory usage
config log settings |