You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. In our app we fetch many listings (over 10k) and then map them to create static pages. Some time ago a number of listings increased and we started getting "Maximum call stack size exceeded" error.
Log:
yarn inc
yarn run v1.22.11
$ cross-env NODE_OPTIONS=--max_old_space_size=8000 GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true npm run gatsby:build --log-pages
> [email protected] gatsby:build D:\Projects\broker-pages
> env-cmd gatsby build
warn Plugin gatsby-plugin-load-script is not compatible with your gatsby version 3.13.0 - It requires gatsby@^2.20.12
warn Plugin gatsby-plugin-load-script is not compatible with your gatsby version 3.13.0 - It requires gatsby@^2.20.12
warn Plugin gatsby-plugin-load-script is not compatible with your gatsby version 3.13.0 - It requires gatsby@^2.20.12
warn Plugin gatsby-plugin-load-script is not compatible with your gatsby version 3.13.0 - It requires gatsby@^2.20.12
success open and validate gatsby-configs, load plugins - 0.939s
success onPreInit - 0.038s
info One or more of your plugins have changed since the last time you ran Gatsby. As
a precaution, we're deleting your site's cache to ensure there's no stale data.
success initialize cache - 12.232s
success copy gatsby files - 0.125s
success Compiling Gatsby Functions - 0.422s
success onPreBootstrap - 0.437s
success createSchemaCustomization - 0.011s
info listings fetch info { numberOfReturned: 2000, timerSeconds: 3 }
info fetchListings modifiedAfterDate=Fri Mar 05 2021 15:24:39 GMT+0200 (Eastern European Standard Time)
info url: https://someapi.dev/listings/all_listings?
info listings fetch info { numberOfReturned: 2000, timerSeconds: 2 }
...fetching more
info fetchListings modifiedAfterDate=Fri Mar 05 2021 15:24:39 GMT+0200 (Eastern European Standard Time)
info url: https://someapi.dev/listings/all_listings?
info listings fetch info { numberOfReturned: 1773, timerSeconds: 4 }
success Checking for changed pages - 0.002s
success source and transform nodes - 239.030s
success building schema - 0.545s
info createPages
info createListingPages
info countCreatePages { cnt: 165772 }
success createPages - 31.143s
success createPagesStatefully - 0.209s
info Total nodes: 331682, SitePage nodes: 165790 (use --verbose for breakdown)
success Checking for changed pages - 0.013s
success Cleaning up stale page-data - 0.340s
success update schema - 0.467s
success onPreExtractQueries - 0.001s
success extract queries from components - 0.791s
success write out redirect data - 0.005s
warn The icon(D:\Projects\broker-pages/sitedata/common/assets/favicon.svg) you provided to 'gatsby-plugin-manifest' is not square.
The icons we generate will be square and for the best results we recommend you provide a square icon.
success Build manifest and related icons - 0.045s
success onPostBootstrap - 0.054s
info bootstrap finished - 291.604s
warn [gatsby-transformer-sharp] The "fixed" and "fluid" resolvers are now deprecated. Switch to "gatsby-plugin-image" for better performance and a simpler API. See
https://gatsby.dev/migrate-images to learn how.
success run static queries - 0.121s - 10/10 82.37/s
success run page queries - 98.413s - 165790/165790 1684.63/s
ERROR
Failed to write out requires Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
- requires-writer.ts:149 getMatchPaths
[broker-pages]/[gatsby]/src/bootstrap/requires-writer.ts:149:20
- requires-writer.ts:189 writeAll
[broker-pages]/[gatsby]/src/bootstrap/requires-writer.ts:189:22
- write-out-requires.ts:18 writeOutRequires
[broker-pages]/[gatsby]/src/services/write-out-requires.ts:18:11
- build.ts:123 build
[broker-pages]/[gatsby]/src/commands/build.ts:123:9
not finished write out requires - 1.531s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] gatsby:build: `env-cmd gatsby build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] gatsby:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\xandg\AppData\Roaming\npm-cache\_logs\2021-09-01T13_30_54_371Z-debug.log
error Command failed with exit code 1.
I don't see any recursions in our code that can cause maximum call stack error. Can someone explain this part, what are these files from the log?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. In our app we fetch many listings (over 10k) and then map them to create static pages. Some time ago a number of listings increased and we started getting "Maximum call stack size exceeded" error.
Log:
I don't see any recursions in our code that can cause maximum call stack error. Can someone explain this part, what are these files from the log?
Beta Was this translation helpful? Give feedback.
All reactions