Serveless app getting timeout on requests API

I have a serveless app and we are getting many occurrences of timeout which is causing us to miss important updates.

We are using $requests API. Log below shows the timeout occurs in 5 seconds elapsed time.

{
	"timestamp": "Apr 5, 2022, 11:00:08 PM",
	"id": "c5222",
	"type": "info",
	"message": "HTTP REQUEST -> URL: GET https://safr.myfreshworks.com/crm/sales/api/contacts/16016328781?include=sales_account \n   HEADERS: { 'Content-Type': 'application/json',\n  Authorization: 'Token token=****' } \n   BODY: {} "
},
{
	"timestamp": "Apr 5, 2022, 11:00:13 PM",
	"id": "c5222",
	"type": "info",
	"message": "Error with GET https://safr.myfreshworks.com/crm/sales/api/contacts/16016328781?include=sales_account { status: 504,\n  headers: {},\n  response: 'Timeout error while processing the request',\n  errorSource: 'APP',\n  attempts: 1 } "
},

Q1: Why would call to freshworks Get Contact API (a single entry referred to by ID) take 5 seconds to respond?
a. Does this indicate a problem with server performance?
b. Is response time impacted by # contacts (we have 80,000 contacts)?

Q1: Is it possible to increase the timeout (to > 5s)?

Note: I see now that I can set maxAttempts and retryDelay. But I would like to understand why we are getting timeouts.

Hey Steve,

  1. I doubt that having around 80k contacts can impact the API performance. Can you please try to confirm the duration on how long it takes from a postman to make the same request ?
  2. You can raise a request to dev-assist.freshworks.com/ to increase the request timeout duration.
    Thanks…!
1 Like

Yes, here’s the service item to raise the request, but it is not recommended to go beyond 10 seconds @stevemc.

Thank you for the information. I have set up retry and I added a fallback to log the failures if retry fails. I’ll monitor this with retry and see if we are still getting failures and if so put a request in to increase to 10s.

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.