Description
In remote_agent.php poll_for_data(), proc_open for the script server
is called inside the foreach($local_data_ids) loop, and proc_close
is called at the end of each iteration. Viewing a realtime graph with
20 script server metrics spawns and kills 20 PHP interpreter processes
in sequence.
Impact
CPU exhaustion on the polling server during realtime graph viewing.
Defeats the purpose of the persistent script server architecture.
Remediation
Move proc_open before the loop and proc_close after the loop. Feed all
queries to a single script server instance per batch.
Description
In remote_agent.php poll_for_data(), proc_open for the script server
is called inside the foreach($local_data_ids) loop, and proc_close
is called at the end of each iteration. Viewing a realtime graph with
20 script server metrics spawns and kills 20 PHP interpreter processes
in sequence.
Impact
CPU exhaustion on the polling server during realtime graph viewing.
Defeats the purpose of the persistent script server architecture.
Remediation
Move proc_open before the loop and proc_close after the loop. Feed all
queries to a single script server instance per batch.