Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
153 views
in Technique[技术] by (71.8m points)

PessimisticConcurrencyConflict Error While Operating On Azure Api Management Using Azure Powershell

Very recently I am observing random PessimisticConcurrencyConflict error while performing some operation on Api Management through Azure Powershell. The full error details given below:

##[error] Error Code: PessimisticConcurrencyConflict Error Message: Operation on the API is in progress Request Id: a9e7d42f-252c-492f-8b45-aeee836c4467 ##[error]PowerShell exited with code '1'.

For instances, I am sure nobody is using the api at that time. The error goes away upon retrying the same powershell.

So far I have observed this issue while using below command in Azure Powershell:

  1. Creating a new Api Revision for an existing Api in Api Management by using

    New-AzApiManagementApiRevision -Context $context -ApiId $APIId -ApiRevision $apiRevision -ApiRevisionDescription $apiRevisionDescription

  2. Importing from an api specification file to an existing Api in Api Management using

    Import-AzApiManagementApi -Context $context -ApiId $apiId -ApiType Http -ApiRevision $apiRevision -Path $path -ServiceUrl $serviceUrl -SpecificationFormat Swagger -SpecificationPath "$SpecificationPath "

question from:https://stackoverflow.com/questions/65879130/pessimisticconcurrencyconflict-error-while-operating-on-azure-api-management-usi

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can't do two concurrent operations at the same entity, APIM locks the entity you are updating/creating until the operation completes and then you can do another operation, you have to wait until the first operation to otherwise it returns the pessimisticconcurrencyconflict error.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...