I have a .NET 8 web api using Oracle EF Core provider. It has Swagger UI configured out of the box. I added no additional configuration to swagger UI.
Everytime I invoke a GET operation that has a big payload (let’s say ~5,000 records from database), it hangs/crashes. But if I invoke the same endpoint using POSTMAN, I get the payload. This only happens with API operations with big payloads. If I have an endpoint that gets a single user, swagger UI works no problem. POST/PUT/DELETE all work. Just any GET operation with big payload. If anyone is wondering the size of the payload: 1.74 MB.
Is there any solution to this? I updated the Swashbuckle Swagger nuget package, but that didn’t seem to solve the problem.
I also use DTO objects so domain entities are not an issue. I checked my entities and there are no relational keys of any sort which can cause issues (referencing other similar but older stackoverflow questions).
What I tried:
- Used DTO objects for API Response so domain entities are not returned
- Updated Swashbuckle/Swagger packages
- Repo queries dbcontext with AsNoTracking()