Server Method Invocation Timeout

Guys, using Server Method Invocation is a great approach when we need to use node libraries or do some processing, but it’s timeout is too low, just 5 seconds!

I’ve faced many times the situation when I’ve needed to broke my code in several calls to Server Method Invocation due to the small timeout, adding too much complexity to a process that shouldn’t have!

I guess it would be nice to allow the configuration of timeout value or have a bigger value!

Server Method Invocation will be called from UI/frontend app and hence has a very less timeout. This is to ensure better user experience.

1 Like

@samuelpares Based on your experience solving different use cases, what should be the ideal timeout which would be helpful? Any followers on this thread can also add their inputs.

3 Likes

@Saif Minimum of 10 seconds is great or a way to configure ourselves in the SMI options payload kind of Static IP option in Client.request.

Hey guys.

As @arshath.h said, it would be great to configure by ourselves the timeout at the moment we call the SMI method. For example:

client.request.invoke('functionName', {param: 1}, timeout);

2 Likes

I agree with you guys, I guess that a minimum of 10 seconds would be good, but the possibility to configure it, would be better.

2 Likes

I agree - 10 seconds is better but the ability to configure would be even better.

2 Likes

Raised a related issue on a separate thread.

2 Likes

@Saif

Do we have any feedback about this subject?
Will the timeout be increased or there’s no plans for it?
And is it possible to increase to a specific custom app for some customer?

@samuelpares

I do have an update on this. The platform team has taken up this item. Currently, discussions are ongoing about the timeout capacity to be increased.

Let me get back with an update on the above question.

2 Likes

@samuelpares, at this time, it appears like it’s not possible to increase the timeout for a specific customer at this time. We are working on a permanent solution to increase the timeout limits.

@prithvi - Please correct me if I am wrong.

2 Likes

@samuelpares As of right now, the timeouts are set in stone for all customers. The dev team is working on getting this feedback addressed ASAP.

2 Likes

@samuelpares With Platform 2.2, you can declare a timeout property in seconds for each function in manifest.json. Valid values for timeout are 5 , 10 , 15 , and 20.

Here is an example manifest.json:

{
  "platform-version": "2.2",
  "product": {
    "freshteam": {
      "location": {
        "job_boards": {
          "url": "template.html"
        }
      },
      "functions": {
        "listEmployees": {
          "timeout": 20
        },
        "getEmployee": {
          "timeout": 20
        },
        "createEmployee": {
          "timeout": 20
        },
        "updateEmployee": {
          "timeout": 20
        },
        "listEmployeeFields": {
          "timeout": 20
        },
        "createEmployeeField": {
          "timeout": 20
        }
      }
    }
  },
  "whitelisted-domains": ["https://*.freshteam.com"],
  "dependencies": {
    "@freshworks/api-sdk": "~0.1.0"
  },
  "engines": {
    "node": "12.22.7",
    "fdk": "7.1.0"
  }
}

I hope that addresses your request. :slight_smile:

3 Likes