Hello everyone,
I'm facing the following problem. I just have set up a rabbitmq queue,
and my node app is subscribed to that queue (via node-amqp). When a
message arrives, the app does an insert and a few updates on a mongodb
(via mongoose). Now the problem comes when there are say 10000 messages
in the queue (durable), and i fire up node. It is flooded by the
messages and although mongodb insertions are started, no callback is
ever called. Finally all messages are consumed, and after a while
mongoose will throw a timeout exception, or node will crash out of
memory. During that time, mongodb reports that it received only like 30
queries.
A temporary solution to that problem, is using rabbitmq's ACKs. That
instructs the queue to not send another message, unless i ack the
previous one. Now if i use that technique, although i ack just after i
call inserts and updates (not in their callbacks), in the end things get
throttled and with a lot less performance the app is doing what it's
supposed to do.
Anyone knows why this is happening? How to fix/avoid it?
I'll give example code if needed.
Thank you,
Dan.
--
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en