TandoorRecipes / recipes

Application for managing recipes, planning meals, building shopping lists and much much more!
https://docs.tandoor.dev
Other
5.56k stars 589 forks source link

/api/shopping-list-entry/ endpoint times out when checked option isn't false or null #3264

Closed anytimesoon closed 2 months ago

anytimesoon commented 3 months ago

Tandoor Version

1.5.18

Setup

Docker / Docker-Compose

Reverse Proxy

Caddy

Other

No response

Bug description

I first noticed this when trying to use the untare app, which uses the /api/shopping-list-entry/ endpoint with the param ?checked=recent. It spins forever and never loads. The web app uses the endpoint with no params, and it works like a charm.

I have tried with the following options:

I'm not super sure what's going on. It looks like the request take a little too long, and nginx times it out.

Relevant logs

tandoor-nginx_recipes-1  | 2024/08/03 11:22:55 [error] 21#21: *1 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.48.1, server: localhost, request: "GET /api/shopping-list-entry/?checked=recent HTTP/1.1", upstream: "http://192.168.48.3:8080/api/shopping-list-entry/?checked=recent", host: redacted
vabene1111 commented 2 months ago

yes, thanks for the report, it is because it returns to much, I am pretty sure we already fixed this on the vue3 branch by moving all endpoints to paginated endpoints which should no longer overload the server. More optimization is probably required but this should suffice for now.