Skip to content

RangeError: Maximum call stack size exceeded in @sentry/remix server instrumentation #16075

Closed
@badeleux

Description

@badeleux

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

9.12.0

Framework Version

Remix 2.16.5

Link to Sentry event

No response

Reproduction Example/SDK Setup

import * as Sentry from "@sentry/remix";

const { SENTRY_DSN, ENVIRONMENT, NODE_ENV } = process.env;

if (NODE_ENV === "production") {
	console.info("Initializing Sentry");
	Sentry.init({
		dsn: SENTRY_DSN,
		tracesSampleRate: 0.3,
		profilesSampleRate: 0.1,
		autoInstrumentRemix: true,
		environment: ENVIRONMENT,
		sendDefaultPii: true,
                 integrations: [nodeProfilingIntegration(), Sentry.prismaIntegration()],
		beforeSendTransaction: (transaction) => {
			if (transaction.request?.url.endsWith("js.map")) return null;
			return transaction;
		},
		ignoreTransactions: ["healthcheck"],
	});
}

Environment
Node.js: v20.19.0
Sentry Remix SDK version: 9.12.0
Using ZenStack enhanced Prisma client
Using pnpm package manager

Steps to Reproduce

  1. Set up a Remix application with Sentry integration
  2. Configure Sentry server instrumentation in instrument.server.mjs
  3. Run the application under load or for an extended period
  4. Observe that occasionally the server crashes with the following error:
/myapp/node_modules/.pnpm/@sentry+remix@9.12.0_@opentelemetry+context-async-hooks@1.30.1_@opentelemetry+api@1.9.0__@ope_uinifbjcggxueklhweoo2zo2yi/node_modules/@sentry/remix/build/cjs/server/instrumentServer.js:167
    return async function ( args) {
                          ^
RangeError: Maximum call stack size exceeded

Expected Result

No crash.

Actual Result

Crash.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions