Hi,
we are running the following code on NodeJs 0.8.2, CentOS 6.3. However node
consumes more and more memory (300-600 MB/day) without releasing it.
------------------------------
var io = require( 'socket.io' ).listen( 8080 );
io.set( 'log level', 1 );
function joinChannel( roomId ) { this.join( roomId.toString() ); }
io.sockets.on( 'connection', function( socket ) { socket.on( 'joinChannel',
joinChannel ); } );
var dgram = require( 'dgram' ).createSocket( 'udp4' );
dgram.on( 'message', function( message ) {
var jsonMessage = JSON.parse( message.toString() );
io.sockets.in( jsonMessage.roomId.toString() ).volatile.emit(
'clientEvent', jsonMessage );
} );
dgram.bind( 8088 );
dgram.addMembership( '224.100.0.1' );
------------------------------
We have about 100-500 concurrent connections (different types, no flash
sockets though) on each front, but since it's not a single-page site, there
are a lot of connects/drops.
Anybody has any idea why we are experiencing this? Are there any obvious
leaks in the code?
The dgram implementation itself does not seem to create the problem, we
tried to run it by itself with no sockets and no emits.
Thanks in advance for any suggestions/advice
best regards J
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en