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?
@SamKreeke We had to build multiple layers of object caching on our backend... Users still get timeouts when requesting items that take longer than 5 seconds on the back end to put together... but even though hubspot bails out - the back end still builds the and caches the object.
SO if it fails, users just refresh once or twice and then it's cached on the backend and the request completes quickly.
Far majority of crm ext requests complete successfully.
Not sure what the 5 seconds is for, 10 seconds would be better.
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.
This topic is pretty old, so let me follow up with my team and verify how our timeouts are configured now. I'll get back to you here when I have more info for you.
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.
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.
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.