Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25538

Content creation via Public API causes memory leak

    XMLWordPrintable

    Details

      Description

      Steps to reproduce:

      1. Prepare a test eZ Publish 5.4 installation, fully updated via composer;
      2. Create a test bundle;
      3. Use the attached "TestImportCommand.php" to verify that there is a memory leak when content is created using the Public API. The command will create 10 contents of type "folder" on node_id 2, and use PHP's memory_get_usage function in order to verify that there is a memory leak:

      $ php ezpublish/console test:testimport
      Start...
      Used memory before starting import : 30535032 Mo
      Import 1
      	Memory at loop Start : 31199536
      	Memory after draft create content : 38181336
      	Memory after content publish : 49521856
      	Delta memory : +18299080 
      	Memory at loop end : 49498696
      Import 2
      	Memory at loop Start : 49498696
      	Memory after draft create content : 49684320
      	Memory after content publish : 49922640
      	Delta memory : +400864 
      	Memory at loop end : 49899512
      Import 3
      	Memory at loop Start : 49899512
      	Memory after draft create content : 50082752
      	Memory after content publish : 50324136
      	Delta memory : +401544 
      	Memory at loop end : 50301008
      Import 4
      	Memory at loop Start : 50301008
      	Memory after draft create content : 50485024
      	Memory after content publish : 50722824
      	Delta memory : +398736 
      	Memory at loop end : 50699696
      Import 5
      	Memory at loop Start : 50699696
      	Memory after draft create content : 51014376
      	Memory after content publish : 51251664
      	Delta memory : +528888 
      	Memory at loop end : 51228536
      Import 6
      	Memory at loop Start : 51228536
      	Memory after draft create content : 51411528
      	Memory after content publish : 51657008
      	Delta memory : +405392 
      	Memory at loop end : 51633880
      Import 7
      	Memory at loop Start : 51633880
      	Memory after draft create content : 51816888
      	Memory after content publish : 52056208
      	Delta memory : +399264 
      	Memory at loop end : 52033096
      Import 8
      	Memory at loop Start : 52033096
      	Memory after draft create content : 52216096
      	Memory after content publish : 52453368
      	Delta memory : +397208 
      	Memory at loop end : 52430256
      Import 9
      	Memory at loop Start : 52430256
      	Memory after draft create content : 52614480
      	Memory after content publish : 52851768
      	Delta memory : +398424 
      	Memory at loop end : 52828632
      Import 10
      	Memory at loop Start : 52828632
      	Memory after draft create content : 53011656
      	Memory after content publish : 53248952
      	Delta memory : +397224 
      	Memory at loop end : 53225808
      Done.
      

      Ref: http://php.net/manual/en/function.memory-get-usage.php

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: