mirror of
https://github.com/Unitech/pm2.git
synced 2026-02-01 16:57:09 +00:00
debug: add info when TCP data flushing is taking a long time
This commit is contained in:
parent
d0f496b55a
commit
f6d0fbf817
@ -264,7 +264,11 @@ var PushInteractor = module.exports = {
|
||||
var t1 = new Date();
|
||||
|
||||
self.tcpSocket.sendv2(str, function() {
|
||||
debugInfo('Time to flush data %ds', (new Date() - t1) / 1000);
|
||||
var duration_sec = (new Date() - t1) / 1000;
|
||||
debugInfo('Time to flush data %ds', duration_sec);
|
||||
if (duration_sec > 0.8)
|
||||
console.error('[CRITICAL] Time to send data over TCP is taking %dseconds!', duration_sec);
|
||||
|
||||
data = null;
|
||||
str = null;
|
||||
return cb();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user