-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Description
Bug report
Describe the bug
Error accessing a record in admin.
Strapi can't handle working with too many records. I only have 1 million and he is crying. I still need to go up another 5 million.
This error only happens when I click on a record that is related to a city that has hundreds of companies.
If I click on a record, in which the city has dozens of companies, the error doesn't happen.
That's because it's running on localhost.
Steps to reproduce the behavior
- Go to /content-manager/collection-types
- Click on any register
- See error
INFO REGISTER COMPANY ID = 1314737
total companies same city = 235611
total companies same category = 272
Expected behavior
Show the data like the example below.
INFO REGISTER COMPANY ID = 2
total companies same city = 1
total companies same category = 2

Screenshots
INFO REGISTER COMPANY ID = 1314737


Searching via Graphql the result comes correctly.

Code snippets
[2021-12-22 21:10:46.340] error: select distinct "t0".*, "t1"."company_id" from "categories" as "t0" left join "companies_category_links" as "t1" on "t0"."id" = "t1"."category_id" where ("t1"."company_id" in ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, ....)) - bind message has 39003 parameter formats but 0 parameters at Parser.parseErrorMessage (/Volumes/SSD Externo/_PROJETOS/XXX/XXX/api-portalfull-v2/node_modules/pg-protocol/dist/parser.js:287:98) at Parser.handlePacket (/Volumes/SSD Externo/_PROJETOS/XXX/XXX/api-portalfull-v2/node_modules/pg-protocol/dist/parser.js:126:29) at Parser.parse (/Volumes/SSD Externo/_PROJETOS/XXX/XXX/api-portalfull-v2/node_modules/pg-protocol/dist/parser.js:39:38) at Socket.<anonymous> (/Volumes/SSD Externo/_PROJETOS/XXX/XXX/api-portalfull-v2/node_modules/pg-protocol/dist/index.js:11:42) at Socket.emit (events.js:315:20) at Socket.EventEmitter.emit (domain.js:467:12) at addChunk (internal/streams/readable.js:309:12) at readableAddChunk (internal/streams/readable.js:284:9) at Socket.Readable.push (internal/streams/readable.js:223:10) at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
And if it keeps trying to show the registration data (blank screen print), some time later this error will appear.
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
System
- Node.js version: v14.16.0
- YARN version: 1.22.17
- Strapi version: v4
- Database: DOCKER/POSTGRES
- Operating system: macos
Content-Type COMPANY
DATA INFOS
total companies = 1.229.134
total cities = 10.186
total categories = 2.351

