Comments (10)
Do you have the management UI available for the production rabbit? If so, you could check, while the listener and send are running,
- there's at least two connections
- there's an exchange called "foobar"
- there's at least one anonymous queue (i.e., called amq-gen.)
- the queue is bound to the exchange -- there's a little diagram which says the bindings
or since you have rabbitmqctl, you could try
rabbitmqctl list_connections
rabbitmqctl list_exchanges
rabbitmqctl list_queues
rabbitmqctl list_bindings
to get the same information.
from rabbit.js.
@squaremo Thanks for your quick reply.
Here's the result. Seems like all connections are okay, exept maybe the "blocking" thing?
Listen.js still isn't receiving data... :(
root@vps20841:~/node# rabbitmqctl list_connections
Listing connections ...
guest 127.0.0.1 48329 blocked
guest 127.0.0.1 56268 blocked
guest 127.0.0.1 44985 blocked
guest 127.0.0.1 48339 blocked
guest 127.0.0.1 48335 blocked
guest 127.0.0.1 59207 blocked
guest 127.0.0.1 49693 blocked
guest 127.0.0.1 38669 blocked
guest 127.0.0.1 42090 blocked
guest 127.0.0.1 59367 blocked
guest 127.0.0.1 55873 blocked
guest 127.0.0.1 48338 blocked
guest 127.0.0.1 39871 blocked
guest 127.0.0.1 56802 blocked
guest 127.0.0.1 51745 blocked
guest 127.0.0.1 32970 blocked
guest 127.0.0.1 52902 blocked
guest 127.0.0.1 44522 blocked
guest 127.0.0.1 48351 blocked
guest 127.0.0.1 45223 blocked
guest 127.0.0.1 36377 blocked
guest 127.0.0.1 41351 blocked
guest 127.0.0.1 39465 blocked
guest 127.0.0.1 48512 blocked
guest 127.0.0.1 46911 blocked
guest 127.0.0.1 43706 blocked
guest 127.0.0.1 60939 blocked
guest 127.0.0.1 44780 blocked
guest 127.0.0.1 47939 blocked
guest 127.0.0.1 48350 blocking
guest 127.0.0.1 48330 blocked
guest 127.0.0.1 58946 blocked
guest 127.0.0.1 39132 blocked
guest 127.0.0.1 57959 blocked
guest 127.0.0.1 55610 blocked
guest 127.0.0.1 44325 blocked
guest 127.0.0.1 60704 blocked
guest 127.0.0.1 39505 blocked
guest 127.0.0.1 39560 blocked
guest 127.0.0.1 59698 blocked
guest 127.0.0.1 54807 blocked
guest 127.0.0.1 53337 blocked
guest 127.0.0.1 43231 blocked
guest 127.0.0.1 58111 blocked
guest 127.0.0.1 48336 blocked
guest 127.0.0.1 56431 blocked
guest 127.0.0.1 47084 blocked
guest 127.0.0.1 38705 blocked
guest 127.0.0.1 50742 blocked
guest 127.0.0.1 50534 blocked
guest 127.0.0.1 44785 blocked
guest 127.0.0.1 48332 blocked
guest 127.0.0.1 43799 blocked
guest 127.0.0.1 52334 blocked
guest 127.0.0.1 49425 blocked
guest 127.0.0.1 45581 blocked
guest 127.0.0.1 37266 blocked
guest 127.0.0.1 35015 blocked
guest 127.0.0.1 48204 blocked
guest 127.0.0.1 54950 blocked
guest 127.0.0.1 42833 blocked
guest 127.0.0.1 41091 blocked
guest 127.0.0.1 57612 blocked
guest 127.0.0.1 39818 blocked
guest 127.0.0.1 34384 blocked
guest 127.0.0.1 44064 blocked
guest 127.0.0.1 34022 blocked
guest 127.0.0.1 47832 blocked
...done.
root@vps20841:~/node# rabbitmqctl list_exchanges
Listing exchanges ...
foobar fanout
amq.rabbitmq.trace topic
amq.rabbitmq.log topic
amq.match headers
amq.headers headers
amq.topic topic
amq.direct direct
amq.fanout fanout
direct
app:events fanout
...done.
root@vps20841:~/node# rabbitmqctl list_queues
Listing queues ...
amq.gen-A8zGHUad-iEEOFhlbqAkcS 0
...done.
root@vps20841:~/node# rabbitmqctl list_bindings
Listing bindings ...
exchange amq.gen-A8zGHUad-iEEOFhlbqAkcS queue amq.gen-A8zGHUad-iEEOFhlbqAkcS []
foobar exchange amq.gen-A8zGHUad-iEEOFhlbqAkcS queue []
...done.
root@vps20841:~/node#
from rabbit.js.
The exchanges, queues, and bindings all look fine from rabbit.js's point of view.
All those blocked connections though -- not sure what's going on there. RabbitMQ will block connections when it thinks it's going to run out of space to put messages; but, you have only one queue, and it has no messages. So it can hardly have run out. Do you mind if I post this to the rabbitmq mailing list to see what people make of it? Also not sure why so many connections -- are there other vhosts set up?
In the meantime, one way to check that it's the blocked connection that's keeping messages from getting through is to look at whether Node has to buffer things itself; an increasing context._connection.bufferSize
will tell you that.
from rabbit.js.
Ah, looking at the rabbitmqctl status
, it appears that RabbitMQ thinks there is about 200MB memory available to it. Does that sound right for the host you're using? I don't think RabbitMQ will handle running in that little memory gracefully; the memory alarm would constantly trigger, which would explain the blocked connections.
from rabbit.js.
You'll be able to tell if that's the case by looking at the logs (default locations given in http://www.rabbitmq.com/relocate.html).
The memory limit will appear in a line similar to
=INFO REPORT==== 29-Oct-2009::15:43:27 ===
Memory limit set to 2048MB.
and the alarm triggering will look like
=INFO REPORT==== 15-Sep-2010::14:53:44 ===
vm_memory_high_watermark set.
Memory used:53650536 allowed:52556595
=INFO REPORT==== 15-Sep-2010::14:53:44 ===
alarm_handler: {set,{vm_memory_high_watermark,[]}}
from rabbit.js.
hmm what would be a minimum of memory to run at? If RabbitMQ's memory footprint's too large, it might be wise to find another solution. My app is quite memory intensive...
from rabbit.js.
I've moved to Redis pub/sub and increased my memory size. Thanks a lot for your help anyway. Even if I'd be able to get RabbitMQ working, I guess it's still overhead! (I'm already using Redis, and guaranteed delivery isn't necessery anyway)
from rabbit.js.
OK no worries -- sounds like the right thing to do. Hey do you think I should make rabbit.js work with Redis too? I'd have to change the name I guess ...
from rabbit.js.
Haha, I don't know, maybe guaranteed delivery and stuff? Redis is blazingly fast, but it is also rather memory intensive if used on large scale... I wrote this really simple messenger based on redis: https://github.com/fabdrol/simplemessenger
btw, I suppose RabbitMQ also operates exclusively in memory.. the main benefit would be when you already use Redis, so there's less overhead
from rabbit.js.
RabbitMQ will put messages on disk if they are marked persistent (for recovery purposes), and it'll page queues out to disk when it starts running out of memory. The message index is in memory though, so there is a hard limit, unless you use the tokyo cabinet plugin to page the index out too. Mostly it likes to have things in memory, for sure.
I might try a redis context just to see what it's like.
from rabbit.js.
Related Issues (20)
- update dependencies and fix verion warnings HOT 1
- cannot connect to SUB HOT 1
- context.close() does not emit "close" event
- How to make a durable named queue?
- [SOLVED] Cant connect to remote host HOT 1
- Identifying the Queue name HOT 2
- Queue durability, exclusivity and consumerTag HOT 1
- Allow control over exchange creation HOT 4
- How to get the contents of header?
- bump amqp.node version to 0.4.4 (Node 4.x) HOT 1
- rabbit.js within AngularJS HOT 6
- How best to implement distributed semaphores? HOT 3
- Running REQ/REP as an RPC
- Advantage of using over plain AMQPLIB HOT 1
- Connect callback not optional
- List queues?
- message in queue impact by another message
- How to set queue x-max-length parameter HOT 3
- example error HOT 1
- Prefetch option can only be set through setsockopt and not as part of socket argument.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rabbit.js.