APC has no predefined max size/eviction mechanism, resulting in eventual OOM crashes
Open
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
Assessment
This issue has not been assessed yet.