question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Possible CPU usage spikes

See original GitHub issue

Just upgraded our large GraphQL service to apollo-server-koa@2 and am seeing inconsistent CPU spikes all over the place. This seems to have caused inconsistent query response times (sometime queries are fast and sometimes they take many seconds).

Haven’t had a chance to dig in yet but figured it was worth reporting now. Worth noting that we rely heavily on remote schema stitching.

Mega Spikes:

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
glassercommented, Apr 8, 2021

There is not enough information here to usefully investigate. (For example, at least one of the cases above was “a user had an infinite loop in their code”.)

1reaction
artboard-studiocommented, Nov 22, 2018

@ZhimaoL In our case, the issue was not related to GraphQL, it was caused by another library we were using, which was causing infinite loops, and because NodeJS is rather dumb, we could not see any errors or warnings. All I did was to use the library on the client side, and bam, there was the error on our console.

The library that was causing the issue: https://github.com/TinyNova/deep-omit-by We fixed the infinite loop it by doing so JSON.parse(JSON.stringify(ourObject))

I hope this helps. I would suggest looking elsewhere for the source of your CPU spikes first.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Stop CPU Spikes - Small Business - Chron.com
Although occasional slowdowns in your PC's performance are normal, prolonged speed problems indicate a CPU spike -- one process is stuck, consuming excess...
Read more >
How to Fix High CPU Usage - Intel
How to Fix High CPU Usage · 1. Reboot · 2. End or Restart Processes · 3. Update Drivers · 4. Scan for...
Read more >
Why does CPU usage spikes up randomly even if computer is ...
If run a CPU usage graph on your PC, you may be surprised to see spikes in usage even when you're not running...
Read more >
What is CPU usage, and how to fix high CPU usage
High CPU usage is often the cause of bad performance. Your computer may be affected by this problem if you're experiencing long loading ......
Read more >
How To Identify Processes That Cause High CPU Utilization ...
Unless you got lucky and quickly open Task Manager to see which process caused the high CPU utilization, you probably just missed catching...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found