Jump to content

Network problems


Andrey Rogovsky
  • Babble 2.1.3 Pending Bug

Hi.

Server part on node.js works very bad, have multiple errors:

NET 22307: already destroyed, fire error callbacks
NET 22307: destroy Error: This socket is closed
    at Socket._writeGeneric (net.js:672:19)
    at Socket._write (net.js:724:8)
    at doWrite (_stream_writable.js:307:12)
    at writeOrBuffer (_stream_writable.js:293:5)
    at Socket.Writable.write (_stream_writable.js:220:11)
    at Socket.write (net.js:650:40)
    at Sender.frameAndSend (/var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:232:22)
    at /var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:57:10
    at Sender.flush (/var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:268:3)
    at Sender.close (/var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:61:8)
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: destroy undefined
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: destroy undefined
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: has server
NET 22307: SERVER _emitCloseIfDrained
NET 22307: SERVER handle? true   connections? 965
NET 22307: afterWrite -32
NET 22307: write failure { Error: write EPIPE
    at exports._errnoException (util.js:1026:11)
    at WriteWrap.afterWrite (net.js:794:14) code: 'EPIPE', errno: 'EPIPE', syscall: 'write' }
NET 22307: destroy
NET 22307: close
NET 22307: close handle
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: destroy Error: This socket is closed
    at Socket._writeGeneric (net.js:672:19)
    at Socket._write (net.js:724:8)
    at doWrite (_stream_writable.js:307:12)
    at writeOrBuffer (_stream_writable.js:293:5)
    at Socket.Writable.write (_stream_writable.js:220:11)
    at Socket.write (net.js:650:40)
    at Sender.frameAndSend (/var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:232:22)
    at /var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:57:10
    at Sender.flush (/var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:268:3)
    at Sender.close (/var/www//applications/babble/sources/Node/node_modules/ws/lib/Sender.js:61:8)
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: destroy undefined
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: destroy undefined
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks

Web part permanently have no connections to node.js, 10-20 users online cause ~3000 connections to node.js

Also this error:

NET 22307: close handle
NET 22307: has server
NET 22307: SERVER _emitCloseIfDrained
NET 22307: SERVER handle? true   connections? 1134
NET 22307: destroy { Error: read ECONNRESET
    at exports._errnoException (util.js:1026:11)
    at TCP.onread (net.js:563:26) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
NET 22307: destroy
NET 22307: already destroyed, fire error callbacks
NET 22307: onread -4095
NET 22307: EOF

Any suggestions?

 


User Feedback

Recommended Comments

it is one of the causes, another possible cause is older versions of nodejs itself. it has to do with a race condition in the disconnect timers for sockets, they seem to only have fixed it for the 6.4 branch:

https://github.com/nodejs/node/issues/878

https://github.com/nodejs/node/pull/7857

https://github.com/nodejs/node/commit/9b6b05556f7684db396376f682f8042685a5b2b6

I'm currently running v4.2.6 on a ubuntu localhost and the same version on my centOS servers. I'll check the babble.js script again for anything i can do to try to alleviate this problem, but i honestly don't think i can as it is in the core of nodejs. 

Link to comment
Share on other sites

I try 4.2.6. Nothing changes.

Looks like memory/sockets leaking. After some time connect to socket.io is very long.

There is head and tail of memory log (scavenge cutted):

[13910] Limited new space size due to high promotion rate: 1 MB
[13910:0x1aa2240]      729 ms: Mark-sweep 16.0 (52.9) -> 13.0 (52.9) MB, 3.7 / 0 ms (+ 16.7 ms in 172 steps since start of marking, biggest step 0.3 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]     1640 ms: Mark-sweep 29.8 (67.9) -> 23.6 (67.9) MB, 4.3 / 0 ms (+ 35.9 ms in 169 steps since start of marking, biggest step 0.4 ms) [GC interrupt] [GC in old space requested].
[13910] Unlimited new space size due to low promotion rate: 1 MB
[13910:0x1aa2240]     2623 ms: Mark-sweep 39.3 (77.9) -> 31.5 (77.9) MB, 7.8 / 0 ms (+ 47.1 ms in 426 steps since start of marking, biggest step 0.2 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]     3752 ms: Mark-sweep 51.1 (91.9) -> 38.7 (91.9) MB, 10.8 / 0 ms (+ 54.8 ms in 168 steps since start of marking, biggest step 0.7 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]     4925 ms: Mark-sweep 56.5 (99.9) -> 41.4 (99.9) MB, 9.9 / 0 ms (+ 63.7 ms in 183 steps since start of marking, biggest step 0.7 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]     5362 ms: Mark-sweep 49.6 (99.9) -> 41.7 (93.9) MB, 29.9 / 0 ms (+ 70.8 ms in 191 steps since start of marking, biggest step 0.9 ms) [GC interrupt] [GC in old space requested].
[13910] Limited new space size due to high promotion rate: 1 MB
[13910:0x1aa2240]     5868 ms: Mark-sweep 50.9 (95.9) -> 43.0 (93.9) MB, 21.2 / 0 ms (+ 88.0 ms in 104 steps since start of marking, biggest step 1.7 ms) [GC interrupt] [GC in old space requested].


 

[13910:0x1aa2240]  3248354 ms: Mark-sweep 643.3 (1035.0) -> 497.0 (838.0) MB, 968.9 / 0 ms [external memory allocation limit reached.] [GC in old space requested].
[13910:0x1aa2240]  3249464 ms: Mark-sweep 500.3 (838.0) -> 493.0 (704.0) MB, 946.7 / 0 ms [external memory allocation limit reached.] [GC in old space requested].
[13910:0x1aa2240]  3250393 ms: Mark-sweep 493.8 (704.0) -> 493.5 (690.0) MB, 928.1 / 0 ms [external memory allocation limit reached.] [GC in old space requested].
[13910:0x1aa2240]  3260918 ms: Mark-sweep 882.0 (1014.0) -> 501.3 (1014.0) MB, 48.0 / 0 ms (+ 877.4 ms in 90 steps since start of marking, biggest step 21.8 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]  3270197 ms: Mark-sweep 939.6 (1078.0) -> 499.7 (1073.0) MB, 169.0 / 0 ms (+ 887.7 ms in 90 steps since start of marking, biggest step 21.9 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]  3279255 ms: Mark-sweep 937.9 (1075.0) -> 499.7 (1075.0) MB, 47.6 / 0 ms (+ 882.5 ms in 90 steps since start of marking, biggest step 22.1 ms) [GC interrupt] [GC in old space requested].
[13910:0x1aa2240]  3288484 ms: Mark-sweep 939.3 (1076.0) -> 499.8 (1076.0) MB, 50.5 / 0 ms (+ 905.6 ms in 107 steps since start of marking, biggest step 18.8 ms) [GC interrupt] [GC in old space requested].
[13910] Limited new space size due to high promotion rate: 1 MB
[13910] Unlimited new space size due to low promotion rate: 1 MB
[13910:0x1aa2240]  3298148 ms: Mark-sweep 924.8 (1090.0) -> 501.2 (1090.0) MB, 47.8 / 0 ms (+ 905.0 ms in 90 steps since start of marking, biggest step 25.7 ms) [GC interrupt] [GC in old space requested].

 

This is time to connect to socket:

# date; wget -O /dev/null http://localhost:8888/socket.io/socket.io.js; date
Fri Aug 26 04:48:53 EDT 2016
--2016-08-26 04:48:53--  http://localhost:8888/socket.io/socket.io.js
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8888... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/javascript]
Saving to: `/dev/null'

    [  <=>                                                                                                                                         ] 184,245      249K/s   in 0.7s    

2016-08-26 04:49:27 (249 KB/s) - `/dev/null' saved [184245]

Fri Aug 26 04:49:27 EDT 2016


 

Link to comment
Share on other sites

I've contacted they guys at socket.io as this seems to be more of a problem with their module, than babble.js. I'll keep you apprised of whatever i find out.

Link to comment
Share on other sites



Guest
This is now closed for further comments

×
×
  • Create New...