How to increase the adapter procedure timeout value in Worklight?

前端 未结 2 2061
太阳男子
太阳男子 2020-12-07 00:03

How can I increase the timeout value of a Worklight adapter procedure? My app crashes and I see the following in the exception details:

\"response [/a

相关标签:
2条回答
  • 2020-12-07 00:46

    There are several places in Worklight where a timeout value can be specified:

    CLIENT ----> WORKLIGHT SERVER -- (adapter) --> BACKEND

    You can increase the adapter procedure timeout (Worklight Server --> Backend) as follows:

    <procedure name="nameHere" requestTimeoutInSeconds="valueHere"/>
    

    I don't know what is your specific use case, so be sure to also increase the client-side timeout. Have them match each other.

    WL.Client.invokeProcedure(invocationData,{
        onSuccess : getDataSuccess,
        onFailure : getDataFailure,
        timeout   : valueHere
    });
    

    Also note that if you need to increase your timeout to a whole minute, consider that something may not be right here...

    0 讨论(0)
  • 2020-12-07 00:56
    var wlInitOptions = 
    {
        // # Worklight server connection timeout
        timeout: 60000,
        ...
    }
    
    0 讨论(0)
提交回复
热议问题