Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Always run in prod environment using: --env=prod 
    1. See Using environments page for further information on Symfony environments.
    2. See Logging & Debug configuration for some of different features enabled in development environments, which by design uses memory.
  2. Avoid Stash (Persistence cache) using to much memory in prod:

    1. If your system is running, or you need to use cache, then disable Stash InMemory cache as it does not limit the amount of items in cache and grows exponentially:

      Code Block
      titleezpublish.yml (snippet, not a full example for stash config)
      stash:
          caches:
              default:
                  inMemory: false 

      Also if you use FileSystem driver, make sure memKeyLimit is set to a low number, default should be 200 and can be lowered like this:

      Code Block
      titleezpublish.yml (snippet, not a full example for stash config)
      stash:
          caches:
              default:
                  FileSystem:
                      memKeyLimit: 100
    2. If your setup is offline and cache is cold, there is no risk of stale cache and you can actually completely disable Stash cache. This will improve performance of import scripts:

      Code Block
      titleezpublish.yml (full example)
      stash:
          caches:
              default:
                  # Note: In eZ Publish 5.3 and earlier "drivers" is called "handlers"
                  drivers: [ BlackholeBlackHole ]
                  inMemory: false
  3. For logging using monolog, if you use either the default fingers_crossed, or buffer handler, make sure to specify buffer_size to limit how large the buffer grows before it gets flushed:

    Code Block
    titleconfig_prod.yml (snippet, not a full example for monolog config)
    monolog:
        handlers:
            main:
                type: fingers_crossed
                buffer_size: 200
  4. Run PHP without memory limits using: php -d memory_limit=-1 app/console <command>
  5. Disable xdebug (PHP extension to debug/profile php use) when running the command, this will cause php to use much more memory.

...