facebook / facebook/hhvm

APC has no predefined max size/eviction mechanism, resulting in eventual OOM crashes

Open
#5,601 3 comments 0 reactions 0 assignees View on GitHub
php5 incompatibility
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

In traditional PHP, you can set an indefinite number of keys in APC without a TTL, and they will just get evicted (LRU) if the apc maximum size is reached. On HHVM, we can just choose to remove the keys that have expired, but there is no way to evict keys set without a TTL.

So it's easy to make HHVM crash for memory exhaustion. I think supporting an APC max size and an eviction policy is important to maintain compatibility with Zend's implementation.

This is easy to reproduce; run the following script

``` php

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.