recipes icon indicating copy to clipboard operation
recipes copied to clipboard

Very poor performance

Open igor47 opened this issue 1 year ago • 8 comments

Tandoor Version

abf8f791360b2bc4a5c7d011877668679bcbb3f2

Setup

Docker / Docker-Compose

Reverse Proxy

Traefik

Other

No response

Bug description

seeing very poor performance with not too many recipes. for instance, here's one example of a search page. my instance has maybe 7 to 9 recipes right now and this request took 15 seconds: image

i was originally just serving static files with gunicorn, but moved it to nginx with no improvement in performance. i also tried increasing the number of gunicorn workers.

another example with a best-case scenario of around 2 seconds, which is still very slow and laggy: image

i can repro by just shift-reloading from /search/

Relevant logs

i don't see anything specific in the logs. there's occasional timeouts, but them seem unrelated to slow requests. for example:

tandoor.purr-1  | [2023-12-23 01:39:08 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:67)
tandoor.purr-1  | [2023-12-23 01:39:09 +0000] [1] [WARNING] Worker with pid 67 was terminated due to signal 9

igor47 avatar Dec 23 '23 01:12 igor47

I'm facing the same issue, and the app only has two recipes

LeGmask avatar Dec 25 '23 00:12 LeGmask

Try rebuilding the recipe index in Admin (under the recipe objects)

smilerz avatar Dec 26 '23 17:12 smilerz

Try rebuilding the recipe index in Admin (under the recipe objects)

Couldn't find this, how do you do this exactly?

Hoffelhas avatar Jan 03 '24 12:01 Hoffelhas

/admin/cookbook/recipe/ --> rebuild index (make sure you select all recipes)

image

smilerz avatar Jan 03 '24 13:01 smilerz

Ah there it is! Thank you. Was able to re-index 'recipe', and also delete any unused values at 'step'.

After doing this the Recipes page doesn't seem to load any faster. Similarly to LeGmask, I only have two recipes yet, but it already takes ~5 seconds to load the page.

Hoffelhas avatar Jan 03 '24 13:01 Hoffelhas

these are typically indicative of low memory conditions. Are you running this on a low powered device and with Postgres on the same system?

tandoor.purr-1  | [2023-12-23 01:39:08 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:67)
tandoor.purr-1  | [2023-12-23 01:39:09 +0000] [1] [WARNING] Worker with pid 67 was terminated due to signal 9

smilerz avatar Jan 03 '24 13:01 smilerz

these are typically indicative of low memory conditions. Are you running this on a low powered device and with Postgres on the same system?

for me, no. i am running postgres on the same system, but the machine has 16G ram with around 9GB free, and an 8-core intel i7 generally running > 90% idle

igor47 avatar Jan 03 '24 16:01 igor47

these are typically indicative of low memory conditions. Are you running this on a low powered device and with Postgres on the same system?

for me, no. i am running postgres on the same system, but the machine has 16G ram with around 9GB free, and an 8-core intel i7 generally running > 90% idle

Your django instance running out of memory - you'll need to troubleshoot why that is.

smilerz avatar Jan 03 '24 16:01 smilerz