High Memory Usage
Description: When a specific PHP request consumes more than the specified amount of memory it generates an event. The “High Memory Usage” Rules contain the memory consumption setting (i.e. the amount of memory the request has to consume to trigger an event).
Information Collected:
The number of occurrences is the best indicator. A single occurrence can be disregarded (change the Status of the Issue to Closed) only if it occurs multiple times it is worth investigating. Closed events An event is a collection of runtime-related information collected by the Monitor component. This information is collected when an event is triggered, according to the conditions defined by the Event Rules. that continue to receive new activity open automatically.
Applicable Diagnostic Actions:
Click on a link to see how to perform each action tools are listed in order of relevance to helping solve the event:
-
Use URL Tracing to collect further information about memory consumption.
- Open code in editor to see if the script can be improved.
- View information in the Logs.
Possible Causes and Solutions:
- Database Functions - Some queries may return large record sets and should be refined.
- Iterative functions – functions that include many ‘foreach’ loops may cause excessive memory usage and should be reviewed to see if less memory can be consumed.
- False Positives - Sometimes requests consume large amounts of memory. Not all requests that consume lots of memory are indicative of a problem in your code or environment and they may be no indication of unacceptable behavior. If this is the case, set issues triggered by this function to ignored.