Hi Martin,
Are you running on latest Stratos ver.? If so, I don't think your autoscale
policy json schema is correct. 'threshold' attribute is missing in it.
Following is a sample.
{
"id": "autoscaling-policy_economy",
"loadThresholds": {
"requestsInFlight": {
"threshold": 20
},
"memoryConsumption": {
"threshold": 70
},
"loadAverage": {
"threshold": 70
}
}
}
Have a look at
/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/autoscale/LoadThresholds.java
class to see the model.
Thanks.
On Fri, Jul 17, 2015 at 10:53 AM, Martin Eppel (meppel) <[email protected]>
wrote:
> Hi Udara,
>
>
>
> Attached is an example of an autoscaling policy which is causing the error
> message.
>
> Considering that this property or the absence of this property doesn’t
> seem to cause any harm or effect but causes ERROR messages in the log
> wouldn’t it be better to change the level to a WARNING or even suppress it ?
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* Udara Liyanage [mailto:[email protected]]
> *Sent:* Thursday, July 16, 2015 9:25 PM
> *To:* dev
> *Subject:* Re: Can some one share some insight on this error (Request in
> flight threshold is Zero) ?
>
>
>
> Hi,
>
>
>
> Stratos auto scaling policy uses three parameters to be scaled. One is
> Request in flight count of the load balancer, that is number is of requests
> to be served. In another way it is equal to no of requests received minus
> no of requests served. If you are using a load balancer this property is
> useful. However if you did not specify this property, autoscaling will not
> consider this property. However this is not a critical effect to
> the function of Stratos since normal functionality works fine without this.
>
>
>
>
>
> On Fri, Jul 17, 2015 at 9:46 AM, Udara Liyanage <[email protected]> wrote:
>
> Hi *Feng*,
>
>
> Welcome to Stratos community.
>
> Could you please share the autoscaling policy you deployed. It
> seems requestsInFlight value of the auto scaling policy is zero or not
> specified.
>
>
>
> On Fri, Jul 17, 2015 at 1:12 AM, Feng Zhou (fezhou2) <[email protected]>
> wrote:
>
> Hello all,
>
>
>
> My name is Feng, I work for Cisco. Nice to be a new member of the
> stratos dev mailing list!
>
>
>
> Want to get some suggestion on a repeated error message we are seeing
> in stratos logs, the log look like this:
>
>
>
> TID: [0] [STRATOS] [2015-06-25 09:48:08,424] ERROR
> {org.apache.stratos.autoscaler.rule.RuleTasksDelegator} - Request in
> flight threshold is Zero
>
> TID: [0] [STRATOS] [2015-06-25 09:49:08,424] ERROR
> {org.apache.stratos.autoscaler.rule.RuleTasksDelegator} - Request in
> flight threshold is Zero
>
> TID: [0] [STRATOS] [2015-06-25 09:50:08,424] ERROR
> {org.apache.stratos.autoscaler.rule.RuleTasksDelegator} - Request in
> flight threshold is Zero
>
>
>
>
>
> It comes up quite often, and from what we observe it seems not do much
> harm… so can someone explain what is this error and is it really an
> error?
>
>
>
> Also I did a little bit of digging inside the code, the following
> code piece looks might be doing the logging:
>
>
>
>
> components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java
>
>
>
>
>
> publicint getNumberOfInstancesRequiredBasedOnRif(float
> rifPredictedValue, float rifThreshold) {
>
>
>
> if (rifThreshold != 0) {
>
>
>
> float requiredNumberOfInstances = rifPredictedValue /
> rifThreshold;
>
> return (int) Math.ceil(requiredNumberOfInstances);
>
> } else {
>
> log.error("Request in flight threshold is Zero");
>
> return0;
>
> }
>
>
>
> }
>
>
>
>
>
> Question is, is it normal for rifThreshold to be 0? Should we fix
> this condition, or if it is not so critical, would it be proper to lower
> this error to like warning?
>
>
>
>
>
> Thank!
>
>
>
>
>
> -Feng Zhou
>
>
>
>
>
> --
>
>
> Udara Liyanage
>
> Software Engineer
>
> WSO2, Inc.: http://wso2.com
>
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
>
> phone: +94 71 443 6897
>
>
>
>
>
> --
>
>
> Udara Liyanage
>
> Software Engineer
>
> WSO2, Inc.: http://wso2.com
>
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
>
> phone: +94 71 443 6897
>
--
Akila Ravihansa Perera
Software Engineer, WSO2
Blog: http://ravihansa3000.blogspot.com