Error with SQLITE_MAX_VARIABLE_NUMBER

It was fixed by overriding the controller in categories
const categories = expect strapi.query('categories').find(ctx.query, ['categories', 'image']);
where “categories”, “image” are related entities

the point was not to receive related products