CRM Extension Timeout

crm_extensions

#1

Hi

I’m getting a request timeout on lots of my CRM extension calls. It appears that the timeout is set to around 2-3 seconds. On average, my JSON response takes a bit longer to than that due to the complexity of the calls I’m making to a third party API. Is there any way to increase the timeout?

Thanks,
Tim


#2

Hi @tfrewin,

It’s not currently possible to increase the timeout of the data fetch request. While I’m not yet sure precisely what the timeout value is, HubSpot expects a response from the data fetch URI quickly in order to render the UI. I’ll reach back out here when I have an exact figure for the timeout.


#3

Hi Derek,

Thanks for your reply.

The slowest logged successful request of mine was 3.032 seconds. When I load one relatively slow request in a browser, it takes between roughly 2-4 seconds. But it never loads in HubSpot.

If I look in my browser dev tools, I can see that HubSpot is calling its own endpoint which in turn must call mine. That has a timeout parameter specified as 7 seconds (https://api.hubspot.com/extensions/sales-objects/v1/objects?objectTypeId=422&associatedObjectId=578xx014&associatedObjectType=COMPANY&portalId=39xx37&clienttimeout=7000).

I’ve tried modifying that parameter and loading the endpoint from my browser but it doesn’t seem to make any difference, I’m not sure that that parameter is actually being used. If the timeout is in fact 7 seconds, that sounds much more reasonable but I’m not sure why it’s taking twice as long for HubSpot to call my endpoint as it is for me to load it in a browser.

Anything that you could do to help me either extend the timeout or figure out why HubSpot is loading my endpoint so slowly would be much appreciated.

Thanks,
Tim


#4

Hi @tfrewin,

The HubSpot app makes a call from the frontend to our own service, which then makes a request to the data fetch URI. The timeout parameter included in the frontend request is unrelated to the request HubSpot makes to your server. The timeout for the request HubSpot is making to your server is around 3 seconds, and it’s currently not possible to adjust that timeout. You should be able to see the CRM extension requests in the API call logging tools of your developer portal to get an idea for how long these requests are taking.