We are currently implementing a full catalog synchronization between our e-commerce platform and Square for one of our clients.
We are using the Catalog API and BatchUpsertCatalogObjects to synchronize products from the e-commerce website to Square through the PHP SDK.
Our implementation works correctly in the Sandbox environment, and all our tests have been successful.
However, when using the Production environment, we systematically receive the following error:
429 Catalog locked by prior request
The issue occurs immediately on the very first batch request, containing 100 products. Therefore, there should not be any previous catalog request from our synchronization process still running or locking the catalog.
We have tested the synchronization multiple times and consistently encounter the same behavior in Production, while the same implementation works as expected in Sandbox.
Could you please help us understand:
- What can cause the catalog to already be locked when sending the first
BatchUpsertCatalogObjectsrequest? - Can the catalog be locked by another Square process or operation, outside of our API requests?
- Is there any difference in catalog locking behavior or limitations between Sandbox and Production?
- Is there a way to determine which request or process is currently holding the catalog lock?
- Are there any additional recommendations or constraints we should follow when performing an initial/full catalog synchronization using batch upserts?
If useful, we can provide the request IDs, timestamps, payload structure, and any additional information required for investigation.
Thank you for your help.