An Azure service for ingesting, preparing, and transforming data at scale.
@Mart Roben - Thanks for the question and using MS Q&A forum.
The error you are encountering,
The Read method cannot be called when another read operation is pending, typically indicates a concurrency issue where multiple read operations are being attempted simultaneously on the same connection.
Here are some steps you can take to diagnose and potentially solve this problem:
- Review Connection Pooling Settings: Ensure that connection pooling settings are correctly configured. Setting pooling to "no" might not be ideal for handling large datasets. Instead, try adjusting the pool size settings.
- Increase Command Timeout: You've already set the command timeout to 0 (no timeout), which is a good step. However, ensure that the connection timeout is also sufficiently large to accommodate the data volume.
- Optimize Query: Consider optimizing your query if possible. Instead of
SELECT *, specify only the necessary columns. Use pagination or batch processing to handle large datasets. This can be done by modifying your query to fetch data in smaller chunks. - Check Self-Hosted Integration Runtime Configuration: Ensure that your self-hosted integration runtime has sufficient resources (CPU, memory) to handle large data transfers. Check for any network latency issues between your self-hosted integration runtime and the Azure PostgreSQL database.
- Monitor Database Performance: Use PostgreSQL performance monitoring tools to check for any bottlenecks or issues on the database side. Ensure that the database is not under heavy load and there are no locks or long-running transactions that could affect performance.
- Retry Logic: Implement retry logic in your ADF pipeline to handle transient issues. This can be done by setting the retry policy in the Copy Data activity.
- Detailed Logs and Diagnostics: Enable detailed logging in ADF to capture more information about the failure. Check PostgreSQL logs for any related errors or warnings during the data transfer.
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click `Accept Answer` and `Yes` for was this answer helpful. And, if you have any further query do let us know.