gatsby: Building process crashes with message Illegal instruction

Description

When building large number of pages, building process crashes with message Illegal instruction (core dumped) on Linux or Illegal instruction: 4 on Mac.

Steps to reproduce

I can’t provide any code here, but this happens when building between 4500-4750 pages in the affected project. Building 4500 pages works. This is a huge blocker for us as we need to build between 15000-25000 pages in total.

Previously we had problems with very slow query executions (1-2qps) but managed to dramatically improve that (300-400qps) by moving the queries from pages to gatsby-node.js.

During gatsby build of 4750 pages RAM usage tops out between 4-6 GB and stays there for some time. After that the process crashes.

I’ll paste the command output below along with two files from the profiler.

Expected result

Build all the pages.

Actual result

Crashed.

Environment

I’ve tried it locally on my Mac, and on AWS instances with up to 16 vcpus and 30 GB of RAM. This is the information from the Mac.

  System:
    OS: macOS 10.14.3
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.9.0 - ~/n/bin/node
    Yarn: 1.12.1 - /usr/local/bin/yarn
    npm: 6.5.0 - ~/n/bin/npm
  Languages:
    Python: 2.7.10 - /usr/bin/python
  Browsers:
    Chrome: 72.0.3626.121
    Firefox: 65.0
    Safari: 12.0.3
  npmPackages:
    gatsby: ^2.1.13 => 2.1.23 
    gatsby-image: ^2.0.29 => 2.0.31 
    gatsby-plugin-extract-schema: ^0.0.5 => 0.0.5 
    gatsby-plugin-manifest: ^2.0.20 => 2.0.22 
    gatsby-plugin-postcss: ^2.0.2 => 2.0.5 
    gatsby-plugin-react-helmet: ^3.0.2 => 3.0.8 
    gatsby-plugin-remove-trailing-slashes: ^2.0.7 => 2.0.9 
    gatsby-plugin-sass: ^2.0.7 => 2.0.10 
    gatsby-plugin-segment-js: ^3.0.1 => 3.0.1 
    gatsby-plugin-sharp: ^2.0.14 => 2.0.25 
    gatsby-plugin-sitemap: ^2.0.6 => 2.0.6 
    gatsby-plugin-svgr: ^2.0.1 => 2.0.1 
    gatsby-source-contentful: ^2.0.26 => 2.0.35 
    gatsby-transformer-remark: ^2.3.0 => 2.3.1 
    gatsby-transformer-sharp: ^2.1.8 => 2.1.15 

Gatsby build output : link Profiler output 1: link Profiler output 2: link

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

ok sweet thanks for testing it out! We hope to get the PR up and running ASAP