tj / axon

message-oriented socket library for node.js heavily inspired by zeromq
MIT License
1.5k stars 155 forks source link

'Unexpected token' errors under load #135

Open matthiasg opened 10 years ago

matthiasg commented 10 years ago

I have a few relatively high load errors where I get the following errors:

undefined:1                                                                                                   
8´┐¢´┐¢U´┐¢´┐¢                                                                                                
 ^                                                                                                            
SyntaxError: Unexpected token ´┐¢                                                                             
  at Object.parse (native)                                                                                    
  at unpack (E:\iris\node_modules\axon\node_modules\amp-message\index.js:139:32)                              
  at decode (E:\iris\node_modules\axon\node_modules\amp-message\index.js:83:15)                               
  at new Message (E:\iris\node_modules\axon\node_modules\amp-message\index.js:35:37)                          
  at Parser.<anonymous> (E:\iris\node_modules\axon\lib\sockets\sock.js:223:15)                                
  at Parser.emit (events.js:95:17)                                                                            
  at Parser._write (E:\iris\node_modules\axon\node_modules\amp\lib\stream.js:91:16)                           
  at doWrite (_stream_writable.js:225:10)                                                                     
  at writeOrBuffer (_stream_writable.js:215:5)                                                                
  at Parser.Writable.write (_stream_writable.js:182:11)                                                       
  at write (_stream_readable.js:601:24)                                                                       
  at flow (_stream_readable.js:610:7)                                                                         
  at Socket.pipeOnReadable (_stream_readable.js:642:5)                                                        
  at Socket.emit (events.js:92:17)                                                                            
  at emitReadable_ (_stream_readable.js:426:10)                                                               
  at emitReadable (_stream_readable.js:422:5)                                                                 
  at readableAddChunk (_stream_readable.js:165:9)                                                             
  at Socket.Readable.push (_stream_readable.js:127:10)                                                        
  at TCP.onread (net.js:528:21)                                                                               

This happens quite regularly and more or less predictably though the actual token (´┐¢ in this case) changes.

I am trying to isolate now, but will also just try to replace the messaging with zeromq for comparison.

tj commented 10 years ago

hmm interesting, I've never seen this result :s, if you can reproduce let me know!