async function installMonitoredItem(subscription, nodeId) {
    debugLog("installMonitoredItem", nodeId.toString());
    const monitoredItem = await subscription.monitor(
        { nodeId, attributeId: AttributeIds.Value },
        {
            samplingInterval: 0, // reports immediately
            discardOldest: true,
            queueSize: 10
        },
        TimestampsToReturn.Both,
        MonitoringMode.Reporting
    );
    const recordedValue = [];

    monitoredItem.on("changed", function (dataValue) {
        recordedValue.push(dataValue.value.value);
        debugLog("change =", recordedValue);
    });
    return await new Promise((resolve, reject) => {
        const timer = setTimeout(() => {
            reject(new Error("Never received changedx for id" + nodeId.toString()));
        }, 5000);

        monitoredItem.once("changed", function (dataValue) {
            clearTimeout(timer);
            resolve([recordedValue, monitoredItem]);
        });
    });
}
The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.