RuntimeException: Failed to execute regex: PREG_JIT_STACKLIMIT_ERROR
  • 12 Jan 2021
  • 1 Minute To Read
  • Print
  • Share
  • Dark
    Light

RuntimeException: Failed to execute regex: PREG_JIT_STACKLIMIT_ERROR

  • Print
  • Share
  • Dark
    Light

Description

[RuntimeException]                                  
Failed to execute regex: PREG_JIT_STACKLIMIT_ERROR

This error is received when using composer (composer require) to add additional modules.

Cause

The error is thrown if the backtracking/recursion limit is not high enough.

Solution

Either increase the limits to your requirements or switch off PCRE's just-in-time compilation in your php.ini:

pcre.jit=0

You can also switch off PCRE just in time compilation using your deploy.yml.

image:
  tag: ...
  php:
    ini:
      'pcre.jit': 0
Was This Article Helpful?