Skip to content

JavaScript heap out of memory #12594

Closed as not planned
Closed as not planned

Description

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

7.117.0

Framework Version

@sentry/nextjs

Link to Sentry event

No response

SDK Setup

Sentry.init({
  enabled,

  environment: IS_PRODUCTION ? "production" : "development",

  dsn: "",

  // Adjust this value in production, or use tracesSampler for greater control
  tracesSampleRate: 1,

  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false,

  replaysOnErrorSampleRate: 1.0,

  // This sets the sample rate to be 10%. You may want this to be 100% while
  // in development and sample at a lower rate in production
  replaysSessionSampleRate: 0.1,

  // You can remove this option if you're not planning to use the Sentry Session Replay feature:
  integrations: [
    Sentry.replayIntegration({
      // Additional Replay configuration goes in here, for example:
      maskAllText: true,
      blockAllMedia: true
    })
  ]
});

Steps to Reproduce

npm run build

Expected Result

#26 3.523 staff:build: warn  - In order to be able to deminify errors, @sentry/nextjs creates sourcemaps and uploads them to the Sentry server. Depending on your deployment setup, this means your original code may be visible in browser devtools in production. To prevent this, set hideSourceMaps to true in the sentry options in your next.config.js. To disable this warning without changing sourcemap behavior, set hideSourceMaps to false. (In @sentry/nextjs version 8.0.0 and beyond, this option will default to true.) See https://webpack.js.org/configuration/devtool/ and https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#use-hidden-source-map for more information.
#26 3.523 staff:build: 
#26 172.2 staff:build: 
#26 172.2 staff:build: <--- Last few GCs --->
#26 172.2 staff:build: 
#26 172.2 staff:build: [53:0x7f1f45da40c0]   166470 ms: Mark-sweep 2016.6 (2086.5) -> 1969.1 (2049.4) MB, 1677.0 / 0.0 ms  (average mu = 0.174, current mu = 0.141) allocation failure; scavenge might not succeed
#26 172.2 staff:build: [53:0x7f1f45da40c0]   168145 ms: Mark-sweep 2008.0 (2072.5) -> 1975.8 (2061.5) MB, 1553.9 / 0.0 ms  (average mu = 0.128, current mu = 0.073) allocation failure; scavenge might not succeed
#26 172.2 staff:build: 
#26 172.2 staff:build: 
#26 172.2 staff:build: <--- JS stacktrace --->
#26 172.2 staff:build: 
#26 172.2 staff:build: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Actual Result

image

The build is successful when Sentry is disabled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    • Status

      Waiting for: Community

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions