Intermittent Apigee error of Javascript runtime exceeding limit of 200ms

StackOverflow https://stackoverflow.com/questions/22995892

  •  01-07-2023
  •  | 
  •  

Pregunta

The use case seeing this error is as follows:

There is an Apigee API Proxy that has been configured for a service. A second API Proxy has a JavaScript policy that makes a call out to the first configured Apigee API Proxy to get back a response and process it. Running this second API Proxy gives the following error from time to time:

"fault": {
    "detail": {
        "errorcode": "steps.javascript.ScriptExecutionFailed"
    },
    "faultstring": "Execution of getlocationserviceresponse failed with error: Javascript runtime exceeded limit of 200ms"
}

There are other JavaScript policies attached to this second Proxy so that the total JavaScript is chopped up into small modules but this runtime exceeded limit error persists from time to time. What can be done to avoid this?

¿Fue útil?

Solución

You should check the configuration of the Apigee javascript policy. Here is an example of a policy definition:

<Javascript async="false" continueOnError="false" enabled="true" 
            timeLimit="200" name="validate-email">
    <DisplayName>validate-email</DisplayName>
    <FaultRules/>
    <Properties/>
    <ResourceURL>jsc://validate-email.js</ResourceURL>
</Javascript>

The timeLimit attribute can be updated to raise the execution limit. It's value is in ms.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top