Thank you for the information @NikunjPatel-2604 .
Given that all these pipelines are In-Progress, I suspect some resource is not responding, and the activities are left waiting for answer. They will wait until the Timeout property is reached.
Since you are using a database, the next step in finding root cause, is to look at whether the database is actually executing the requests. You are using lookups and stored procs. First let us find out which step the pipeline is stuck on.
Go to the Data Factory Monitoring section, and find one of the stuck pipeline runs. Click on the name and it should show you the status of the activities. From this you should be able to determine whether it is lookup or stored proc that is stuck.
Get with your database person and check the logs in the database as to what happened to the request database side. Did the request execute? Did the request get stuck? Or did the request never make it into the database?
For the immediate situation, I recommend you make 2 changes to the pipeline (for now).
- Set the pipeline concurrency to 100, or some number you are comfortable with. If no number is used, more and more will be triggered. The concurrency is total for the pipeline, not per trigger, but until the situation is stabilized, it doesn't matter.
- Set the Timeout property of the Stored Proc and Lookup activities to an hour or some value you are comfortable with. The default value is 7 days, meaning that the activity waits 7 days before giving up and failing. Reducing this value will cause new executions to expire sooner.
To stop all the currently executing runs, we can use Powershell (or other methods) to get the list of pipeline runs and stop each.
Get-AzDataFactoryV2PipelineRun
stop-azdatafactoryv2pipelinerun
Get all the runs of the pipeline in a time window: $list =Get-AzDataFactoryV2PipelineRun -ResourceGroupName <RgName> -DataFactoryName <FactoryName> -PipelineName <ThatPipelinename> -LastUpdatedAfter <startedDate> -LastUpdatedBefore <nowDate>
Get the RunId's of those that are in-Progress: $toStop = $list.ForEach({ if( $_.Status -eq "InProgress") { $_.RunId }} )
Stop them by RunId: $toStop.ForEach({ Stop-AzDataFactoryV2PipelineRun -ResourceGroupName <RgName> -DataFactoryName <FactoryName> -PipelineRunId $_ })