Error 403: ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED

Questions refering to the Optiflow based API within PTV Developer (launched on 20.12.2023)
Post Reply
User avatar
Bernd Welter
Site Admin
Posts: 2816
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Error 403: ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED

Post by Bernd Welter »

Here's some error footage I "found" these days:

Code: Select all

  {"Message": "Error calling StartOptimization: 
  {"description":"A product-specific restriction is exceeded.",
  "errorCode":"ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED","causes":
  [    {"description":"The maximum number of concurrent optimizations is exceeded.",
  "errorCode":"ROUTEOPTIMIZATION_NUMBER_OF_OPTIMIZATIONS_EXCEEDED",
  "details":{"limit":1}
  }   ]   }"}
Currently (9.2.2024) you can't trigger more than 1 optimization call via a specific token.
In other services you'd simply be queued - in PTV Optiflow Developer API you get immediately rejected with the code above.
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2816
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Error 403: ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED

Post by Bernd Welter »

Here is an update:

Meanwhile you can get a 403 message with the list of optimization tasks running under the same token. At least this can help in defining an automated reaction:

Code: Select all

{
  "traceId": "xxxxx",
  "description": "A product-specific restriction is exceeded.",
  "errorCode": "ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED",
  "causes": [
    {
      "description": "The maximum number of concurrent optimizations is exceeded.",
      "errorCode": "ROUTEOPTIMIZATION_NUMBER_OF_OPTIMIZATIONS_EXCEEDED",
      "details": {
        "limit": 1,
        "runningOptimizationIds": "12345678-abcd-abcd-abcd-1234567890ab"
      }
    }
  ]
}
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2816
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Error 403: ROUTEOPTIMIZATION_RESTRICTION_EXCEEDED

Post by Bernd Welter »

UPDATE:
In the meantime a single account can't compute multiple plannings in parallel - even with two different tokens.
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply