Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Important
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.14
-
Fix Version/s: 5.4
-
Component/s: CiviCRM API, NYSS
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Core Team Contract
-
Verified?:No
Description
The attached PHP file demonstrates a significant memory leak in API3 EntityTag get operations.
Change the value of $example (line 7) to 1, 2, or 3 to select the example code to be run.
- Example=1: EntityTag get, 1 contact:
Each call increases memory by ~10KB.
- Example=2: Contact get, 1000 Contacts, plus chained call to EntityTag get:
Each call increases memory by ~10MB (~10KB / contact)
- Example=3: Contact get, 1000 Contacts:
Each call increases memory by ~800B. This is a small amount compared to the EntityTag leak, but perhaps it too should be investigated.
The memory is recovered after the PHP process is terminated.
Warning: Example 2 uses memory rapidly. After several iterations of this call on a server with 2GB of RAM, the entire server was brought down and needed to be rebooted!
File Usage: php api_mem_leak_test.php <civicrm settings file>
Attachments
Issue Links
- links to
(5 links to)