[
https://issues.apache.org/jira/browse/TS-4909?focusedWorklogId=30689&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-30689
]
ASF GitHub Bot logged work on TS-4909:
--------------------------------------
Author: ASF GitHub Bot
Created on: 14/Oct/16 21:27
Start Date: 14/Oct/16 21:27
Worklog Time Spent: 10m
Work Description: Github user jpeach commented on a diff in the pull
request:
https://github.com/apache/trafficserver/pull/1063#discussion_r83504741
--- Diff: proxy/Main.cc ---
@@ -346,6 +346,54 @@ class DiagsLogContinuation : public Continuation
}
};
+class MemoryLimit : public Continuation
+{
+public:
+ MemoryLimit() : Continuation(new_ProxyMutex()), _memory_limit(0) {
SET_HANDLER(&MemoryLimit::periodic); }
+ ~MemoryLimit() { mutex = NULL; }
+ int
+ periodic(int event, Event *e)
+ {
+ if (event == EVENT_IMMEDIATE) {
+ // rescheduled from periodic to immediate event
+ // this is the indication to terminate
+ delete this;
+ return EVENT_DONE;
+ }
+ if (_memory_limit == 0) {
+ // first time it has been run
+ _memory_limit =
REC_ConfigReadInteger("proxy.config.memory.max_usage");
--- End diff --
Ok that sounds reasonable.
Issue Time Tracking
-------------------
Worklog Id: (was: 30689)
Time Spent: 2h 10m (was: 2h)
> Throttling based on resident memory usage
> -----------------------------------------
>
> Key: TS-4909
> URL: https://issues.apache.org/jira/browse/TS-4909
> Project: Traffic Server
> Issue Type: Improvement
> Components: Core
> Reporter: Bryan Call
> Fix For: 7.1.0
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> Add a feature to stop accepting connections if the resident memory is over a
> certain limit.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)