Skip to content

Threading fails because of memory exhaustion #2981

@iluuu1994

Description

@iluuu1994

I start PHPStan with php -d memory_limit=-1 but PHPStan probably spawns the workers with the default memory limit.

Child process error (exit code 255):
In FileCacheStorage.php line 63:

Error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate
20480 bytes)

worker [--paths-file PATHS-FILE] [-c|--configuration CONFIGURATION]
[-l|--level LEVEL] [-a|--autoload-file AUTOLOAD-FILE] [--memory-limit
MEMORY-LIMIT] [--xdebug] [--port PORT] [--identifier IDENTIFIER] [--]
[<paths>...]

Child process error (exit code 255):
In Lexer.php line 80:

Error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate
135168 bytes)

worker [--paths-file PATHS-FILE] [-c|--configuration CONFIGURATION]
[-l|--level LEVEL] [-a|--autoload-file AUTOLOAD-FILE] [--memory-limit
MEMORY-LIMIT] [--xdebug] [--port PORT] [--identifier IDENTIFIER] [--]
[<paths>...]

Child process error (exit code 255):
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 262144 bytes) in
phar:///builds/.../vendor/phpstan/phpstan/phpstan.phar/
vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php on line
843

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 262144 bytes) in
/builds/.../vendor/symfony/error-handler/ErrorHandler.p
hp on line 377

Child process error (exit code 255):
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 2621440 bytes) in
/builds/.../vendor/monolog/monolog/src/Monolog/Utils.ph
p on line 110

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions