Skip to content

rotatePHPRuntime: track occupied memory, rotate the PHP runtime automatically when necessary #998

@adamziel

Description

@adamziel

#990 introduced a rotatePHPRuntime function that swaps the internal PHP runtime for a fresh one after a certain number of requests are handled. This is necessary because PHP has a memory leak and exhaust the HEAP space eventually.

Ideally the rotation logic would be based on the amount of free, unfragmented memory.

The challenge there is to find a fast method of keeping track of that – even a naive approach of calculating the null bytes takes a few blocking seconds.

cc @sejas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions