Problem
Jobs may fail with an error indicating that the workspace has reached the maximum number of active runs, which is set to 1000.
Run failed with error message
There are already 1000 active runs (limit: 1000).
Cause
Jobs are either creating new runs in a loop, causing the workspace to reach the 1000 limit of active runs, or multiple job runs are scheduled at the same time.
Solution
First, identify the jobs that are causing the issue.
- Navigate to Job Runs in the UI.
- Check how many jobs are running.
- Verify if any jobs have a high number of runs corresponding to the same job ID (evidence of creating new runs in a loop).
Next, cancel the runs for the identified jobs using the UI or the API.
Through the UI:
- Navigate to Workflows.
- Select the job that has been identified as running in a loop.
- From the Runs tab, select the option Cancel Runs.
To use the API, please refer to the Cancel all runs of a job documentation.
Then, check the job configuration and scheduling settings. Be sure you define schedules based on your expected timeframe, avoiding running jobs within seconds or minutes of each other. Avoid steps that call the job multiple times.
Last, monitor the workspace to ensure that the issue does not recur.