-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random generic server crashes in the log #38
Comments
@jnordberg can you please post your publishing code (in particular the message metadata/ |
|
I just figured it out when trying to write a small code example that could reproduce it, in some cases I was sending priority: 0 which causes this error. var amqp = require('amqp')
var connection = amqp.createConnection({host: 'localhost'})
connection.on('error', function(error) {
console.log('connection error', error)
})
connection.once('ready', function() {
console.log('connection ready')
var exchangeOpts = {
durable: true,
autoDelete: false,
confirm: true
}
connection.exchange('test-exchange', exchangeOpts, function(exchange) {
console.log('exchange open')
var msg = {hello: 'world'}
var opts = {priority: 0}
console.log('publish message', msg);
exchange.publish('test', msg, opts, function() {
console.log('message published', msg, arguments)
})
})
connection.queue('my-queue', function(queue) {
console.log('queue ready')
queue.bind('test-exchange', 'test')
queue.subscribe(function(message) {
console.log('got message', message);
})
})
})
|
@jnordberg is this using node-amqp? node-amqp is known to have issues and is not maintained, so I'd recommend trying with amqp.lib. In general, priority = 0 should be fine but I cannot reproduce the issue so far with Ruby and Java clients. So my guess is that node-amqp simply does not serialize things properly when |
@michaelklishin yep, node-amqp was the culprit. Sorry for the hassle and thanks for the amqp.lib tip, setting priority to 0 there causes no problems. |
I'm getting crashes when publishing messages, it seems to happen every 20th message i publish or so. Maybe i'm doing something wrong but I can't make heads or tails of the error logs.
Running CentOS 6 in VirtualBox
The text was updated successfully, but these errors were encountered: