I’m currently experiencing an issue making my app unusable: very slow queries.
I have to retrieve about 30 entities, composed of simple components and pictures, but the requests are unusually long, around 30s.
I searched quite a bit for a solution, tried to better target the data to be recovered in the controller, and finally reduced the time by almost 2. But 14s is far too long for a correct user experience, especially considering the amount of data to get back.
I saw that several people encounter the same problem as me, and that it would be related to auto populate.
I have very few backend and databases knowledge and this is the first time I created a backend. (that’s why I use Strapi ^^’)
Strapi currently does not officially support Node v15.* . The recommended version is v14.*
Can you install nvm and switch to Node’s LTS version and repeat the tests? Also don’t forget to delete node_modules folder and reinstall all the packages before repeating the tests.
Yeah, it worked well during dev with my tests files too. I had like 5 events, with 2 iterations and something like 10 pictures max. I don’t really know from when the queries become so slow, I guess it’s more or less exponential.
So, there are currently 27 events. Each events has at least 2 iteration, up to 6 for now. And each iteration has between 15 to 20 main_pictures, and 20 to 100 additional_pictures.
To give you a bit of context, this is a site for a photographer that covers events every year. So there is an event which contains one iteration per year.
I had the same issue couple days ago. Wasn’t even using images but rather 4 to 5 relation fields on mondoDB within one collection. Couldn’t figure out a fix and since it was the initial stage of the project decide to not use Strapi.
If you guys figure out a fix let me know
I too have the problem where the requests are very slow even on localhost using the build version. At first it’s about 300-500 ms and successive requests are about 50-150 ms.
When I wait around 10 seconds the request time is 300-500 ms again.