Hi @saikumar-7223
Thank you for providing the additional details.
Based on the behavior you described, where the API works successfully with smaller amounts of data but encounters failures when processing 6,000+** SQL records or when the operation runs for several **minutes, the request duration is an important factor to consider.
For Windows-based** Azure App Service, Microsoft documents that a web request can time out after approximately 230 **seconds if the application does not return a response. Therefore, long-running database operations should generally not depend on keeping a single HTTP request open until all processing has completed.
For this scenario, I recommend the following:
Avoid** processing the entire large dataset in one synchronous API **request. Where possible, divide the database operation into smaller batches so each request can complete more quickly.
For** inherently long-running processing, use a background-processing **approach. Microsoft recommends Azure WebJobs for background processing when work cannot reasonably complete within the web request.
Because you are seeing HTTP** **500, please also review the application and SQL/database logs around the failed request. This is important because an application or SQL exception could also be occurring before the App Service request timeout is reached.
If smaller requests consistently succeed while only the long-running requests fail, redesigning the operation so that the API accepts the request and the actual processing continues asynchronously would be a more suitable approach than keeping the API connection open for the complete database operation.
Also, there isn't enough evidence here to conclude that 6,000** records itself is an Azure App Service **limit. The more relevant consideration is how long the synchronous HTTP request remains active and whether the application/database encounters an exception during that processing.
Reference:
If the answer is helpful, please do click "Accept the answer” and Yes, this can be beneficial to other community members.