How to increase session timeout on REST API calls

Jake_Whitcomb
Level 1

How to increase session timeout on REST API calls

We want to increase the session timeout on API calls, specifically on create/update leads REST API call http://developers.marketo.com/documentation/rest/createupdate-leads/.

What is the best practice for setting the session timeout, and how do you accomplish this? 90 seconds is default timeout.

Tags (2)
6 REPLIES 6
Jonathan_Wu
Level 2

Re: How to increase session timeout on REST API calls

Hi Jake,

This is a hard coded timeout and cannot be increased, but you might try using asyncProcessing as a workaround

Kenny_Elkington
Marketo Employee

Re: How to increase session timeout on REST API calls

Why are you trying to change the timeout?

Jake_Whitcomb
Level 1

Re: How to increase session timeout on REST API calls

On occasion, we receive "SocketTimeoutException: Read timed out" error when our upsertLeads request takes longer than the session timeout. Right now we do not set asyncProcessing param on these calls.

Jake_Whitcomb
Level 1

Re: How to increase session timeout on REST API calls

Important clarification:

We have a timeout on our calls and it is not enough for upsertLeads. Is there a recommended timeout you recommend from the client side? Our rest client issues the upsertLeads and it will time out if it doesn’t see a response in the specified timeout (our default is 60 seconds). We can override client-side timeout for all Marketo calls if you think it might be helpful in this case -- perhaps to 90 seconds?

Kenny_Elkington
Marketo Employee

Re: How to increase session timeout on REST API calls

The server-side timeout for syncLead is 90 seconds, so that would leave you in better shape.  If you still have issues with timeouts then, you'll want to reduce your batch size.

Jake_Whitcomb
Level 1

Re: How to increase session timeout on REST API calls

Ok - we will look into both options. Thanks Kenny