Memory leak caused by message trackTimeout
See original GitHub issueHej,
I’ve experienced serious memory leaks under high load (high number of NSQ messages in queue) and traced it down to the trackTimeout
being set in message.coffee
file (lines 23-32 ).
There are 2 things that I suspect could be the reason:
- id message does not timeout, timeout is not cleared when
message.finish()
is called - compiled javascript code looks suspiciously recursive:
(trackTimeout = function() {
var hard, soft;
if (_this.hasResponded) {
return;
}
soft = _this.timeUntilTimeout();
hard = _this.timeUntilTimeout(true);
_this.timedOut = !soft || !hard;
if (!_this.timedOut) {
return setTimeout(trackTimeout, Math.min(soft, hard));
}
})();
Could you please investigate and verify if this is actually the case?
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
3 Troubleshoot Memory Leaks - Java - Oracle Help Center
One common indication of a memory leak is the java.lang. ... Cause: The detail message Java heap space indicates that an object could...
Read more >How to Detect Memory Leaks in Java: Causes, Types, & Tools
A memory leak is a situation where unused objects occupy unnecessary space in memory. Unused objects are typically removed by the Java ...
Read more >Configuring the memory leak policy - IBM
When a classloader memory leak is detected, WebSphere Application Server notifies you with informational messages in the log and by taking JVM heapdumps...
Read more >Using jQuery.text() Causes Memory Leak - Stack Overflow
I am creating a single page application that will remain active and open for multiple days at a time in a browser. On...
Read more >4 Types of Memory Leaks in JavaScript and How to Get Rid Of ...
Leaks are the cause of whole class of problems: slowdowns, crashes, high latency, and even problems with other applications. What are memory ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hej, I’m attaching the nsqd 180s message timeout test with PR code below. max_in_flight was set to 10. Tests were run with node version v6.2.0
Fixed in #118