API request timeout GET/POST

Hi All,

I would like to understand what is causing the timeout errors when connecting for import/export data using Anaplan Connect v2.0 using pvt key auth. Is it due to some kind of restriction to prevent multiple processes to access Anaplan?

 

2021-12-30 07:38:31 INFO [pFeignClientProvider:30 ] 18303 |-- Setting up proxy...
2021-12-30 07:38:31 INFO [c.a.client.Service :102 ] 18303 |-- Initializing Service...
2021-12-30 07:38:31 INFO [ificateAuthenticator:42 ] 18303 |-- Authenticating via Certificate...
2021-12-30 07:38:32 INFO [pFeignClientProvider:30 ] 18303 |-- Setting up proxy...
2021-12-30 07:39:34 INFO [.t.r.FeignApiRetryer:48 ] 18303 |-- Retrying API request: Attempt (1)
2021-12-30 07:39:34 DEBUG [.t.r.FeignApiRetryer:49 ] 18303 |-- Request details: timeout executing GET https://api.anaplan.com/2/0/workspaces/8a81b0126a**/models/07275F26F77B43F28F24F93AA*****/files?offset=0
2021-12-30 07:40:37 INFO [.t.r.FeignApiRetryer:48 ] 18303 |-- Retrying API request: Attempt (2)
2021-12-30 07:40:37 DEBUG [.t.r.FeignApiRetryer:49 ] 18303 |-- Request details: timeout executing GET https://api.anaplan.com/2/0/workspaces/8a81b0126a**/models/07275F26F77B43F28F24F93AA*****/files?offset=0
2021-12-30 07:41:41 INFO [.t.r.FeignApiRetryer:48 ] 18303 |-- Retrying API request: Attempt (3)
2021-12-30 07:41:41 DEBUG [.t.r.FeignApiRetryer:49 ] 18303 |-- Request details: timeout executing GET https://api.anaplan.com/2/0/workspaces/8a81b0126a**/models/07275F26F77B43F28F24F93AA*****/files?offset=0
2021-12-30 07:42:48 ERROR [c.a.client.Program :811 ] 18303 |-- Server files not found: Server-Files not found for Model-ID=07275F26F77B43F28F24F93AA***** (Retryable: timeout executing GET https://api.anaplan.com/2/0/workspaces/8a81b0126a**/models/07275F26F77B43F28F24F93AA*****/files?offset=0 (Socket timeout: timeout (SSL: java.net.SocketException: Socket closed (Socket: Socket closed))))

 

Thanks,
HB

Answers

  • Hi,

    There are many reasons why you get timeout and then error. Was it one time situation? Is this scheduled run, or ad-hoc one? Were there other tasks running in the background in the same time in this model/workspace (you can check that in history or audit)? I'd bet that it was because workspace was busy with another task. But if this problem will come up again (and it's not because of model being busy), just contact support.

  • Thanks for the response. Please find my answers below:

    1. Was it one time situation? It has been observed 3 times so far on different processes, but rare.
    2. Is this scheduled run, or ad-hoc one? It was adhoc run.
    3. Were there other tasks running in the background in the same time in this model/workspace (you can check that in history or audit)? Usually, we have multiple calls done at the same time or atleast close together via the Anaplan Connect utility. But the calls are always to different processes (does not call same Anaplan process) under same Workspace.

    Does running different processes under same workspace cause the latter processes to wait in queue, causing the timeout?

  • If processes/imports/exports relate to the same model then concurrent activity may result in blocking.

  • Check your end points, this end point looks a bit odd to me 

     

    https://api.anaplan.com/2/0/workspaces/8a81b0126a**/models/07275F26F77B43F28F24F93AA*****/files?offset=0

     

    I would expect the endpoint to look something like .../models/{model_id}/files/{file_id}

  • Thanks @sean_culligan. We are using Anaplan Connect v2.0.0, and those API endpoints are all internal messages as part of enabling debug. We have now opened a case with Anaplan support to understand and assist forward.

     

    Thanks everyone for the comments and sharing your views.

  • From what we understand from Anaplan support, the timeouts are happening when the model is getting loaded to memory (after having unloaded due to not in use for a time period - 1 hour). For now, we have made use of the below parameters to have more # of attempts, and increased the timeout duration to wait a little longer on every attempt.

    Anaplan Connect parameters used to extend the timeout:
    -retrytimeout
    -httptimeout
    -maxretrycount
  • @hemachandran that makes sense and is a common issue. The work-around is to schedule a simple process at the start of the schedule to hit the model then wait for it to load into memory, then you run your full schedule a couple of minutes afterwards.

  • @sean_culligan That sounds like a good way around the issue. I can try it out. Do you know whether there is any way available to know when the model has completed the load?

    I am thinking along the lines like maybe, perform an API call to hit the model such as fetching the files/processes list, monitor for the model to load somehow, then continue with the actual process schedule. (Would I get the API response only when the model has loaded?)

  • @hemachandran I think you can see the model state at this end point, the link to the API docs is here

     

    https://api.anaplan.com/2/0/models/{modelId}

     

    This should give you the model state that you could then use to decide when to start the schedul