Please sign in to comment.
provide a way to abort ongoing requests due to memory pressure
Summary: Sometimes it is better to abort ongoing requests than to have the entire process killed when it OOMs. This diff introduces two bits in request injected data, to indicate host-level OOM and the decision to abort the request, respectively. A request is only aborted when the host-level OOM bit is set and the request is using more memory than a configurable threshold. When a request is aborted, shutdown handlers and PSP code will not run. Reviewed By: markw65 Differential Revision: D7230817 fbshipit-source-id: 1f23f96ff5aeb667a447b1fcad6f74c70c3ef4bc
- Loading branch information...
Showing with 139 additions and 0 deletions.
- +21 −0 hphp/runtime/base/execution-context.cpp
- +1 −0 hphp/runtime/base/execution-context.h
- +18 −0 hphp/runtime/base/program-functions.cpp
- +2 −0 hphp/runtime/base/request-injection-data.cpp
- +35 −0 hphp/runtime/base/request-injection-data.h
- +4 −0 hphp/runtime/base/runtime-option.cpp
- +2 −0 hphp/runtime/base/runtime-option.h
- +37 −0 hphp/runtime/base/thread-info.cpp
- +6 −0 hphp/runtime/base/thread-info.h
- +13 −0 hphp/util/exception.h