Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application freezes with @pyroscope/nodejs version 0.4.3 (works fine on 0.3.9) - Next.js specific issue #109

Open
nick-levshin opened this issue Jan 30, 2025 · 1 comment

Comments

@nick-levshin
Copy link

nick-levshin commented Jan 30, 2025

After upgrading to @pyroscope/nodejs version 0.4.3, our Next.js application starts freezing after a while, even though system resources (CPU, memory) are normal and there's no indication of resource exhaustion. The application works fine with version 0.3.9.

This issue occurs only in Next.js applications. When running a standard Node.js app with the same version of Pyroscope, no issues are observed.

Steps to reproduce:

Install @pyroscope/nodejs version 0.4.3.
Initialize the Pyroscope client in a Next.js application using:

const pyroscope = require('@pyroscope/nodejs');

pyroscope.init({
  serverAddress: 'http://someaddress, 
  appName: 'my-next-app',
});

The application starts freezing after some time (around 40 minutes) without any significant resource usage, causing unresponsiveness.

Environment:

Node.js version: 22.2.0
Next.js version: 14.2.11

Pyroscope does not output any relevant logs in the console during the freeze. The last log entries before the freeze are:

pyroscope::profiler::wall profile +1m
pyroscope::profiler::heap profile +1m
@apaniel
Copy link

apaniel commented Mar 27, 2025

After upgrading to @pyroscope/nodejs version 0.4.3, our Next.js application starts freezing after a while, even though system resources (CPU, memory) are normal and there's no indication of resource exhaustion. The application works fine with version 0.3.9.

This issue occurs only in Next.js applications. When running a standard Node.js app with the same version of Pyroscope, no issues are observed.

Steps to reproduce:

Install @pyroscope/nodejs version 0.4.3.
Initialize the Pyroscope client in a Next.js application using:

const pyroscope = require('@pyroscope/nodejs');

pyroscope.init({
  serverAddress: 'http://someaddress, 
  appName: 'my-next-app',
});

The application starts freezing after some time (around 40 minutes) without any significant resource usage, causing unresponsiveness.

Environment:

Node.js version: 22.2.0
Next.js version: 14.2.11

Pyroscope does not output any relevant logs in the console during the freeze. The last log entries before the freeze are:

pyroscope::profiler::wall profile +1m
pyroscope::profiler::heap profile +1m

Have you checked the event loop usage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants