05-14-2024 07:38 AM
I am getting error code 160025 despite creating only 20 tasks.
When checking rateLimits, my remaining API calls is 100000.
How do I prevent triggering this error?
My goal is to pull an inventory report every 15 minutes by doing the following:
- createInventoryTask
- getTaskID
- Loop until task = 'COMPLETE'
-getReportFile
06-17-2024 11:44 PM
Hello,
To prevent error code 160025, which indicates exceeding the maximum concurrent task limit despite having sufficient API call limits, implement these strategies. Throttle task creation to avoid exceeding the concurrency limit by only initiating new tasks when the current number of running tasks is below a set threshold. Check existing task statuses before creating new tasks, delaying creation if too many tasks are already running. Optimize task processing to ensure efficiency and reduce task duration. Implement a backoff mechanism to retry creating tasks with increasing delays after encountering the error. Continuously monitor API usage and adjust throttling and concurrency control accordingly, including requesting higher limits if needed. These steps will help maintain a smooth inventory report retrieval process without triggering the error.
Best Regard,
florgay-35