0

I have a VM with a RabbitMQ instance running, and a separate VM with a Node process that will consume things off of a queue.

After some time of inactivity, my Node process will just quit and display an error. I have forever keeping the Node process alive but here is what the error looks like:

data:    server.js:18171 - error: Script restart attempt #33
data:    server.js:18171 -  [rabbitmq] Waiting for messages in savvy_shipping_to_logic. To exit press CTRL+C
data:    server.js:18171 - Error: read ETIMEDOUT
data:    server.js:18171 -     at errnoException (net.js:901:11)
data:    server.js:18171 -     at TCP.onread (net.js:556:19)
data:    server.js:18171 - error: Forever detected script exited with code: 8
data:    server.js:18171 - error: Script restart attempt #34
data:    server.js:18171 -  [rabbitmq] Waiting for messages in savvy_shipping_to_logic. To exit press CTRL+C
data:    server.js:18171 - Error: read ETIMEDOUT
data:    server.js:18171 -     at errnoException (net.js:901:11)
data:    server.js:18171 -     at TCP.onread (net.js:556:19)
data:    server.js:18171 - error: Forever detected script exited with code: 8
data:    server.js:18171 - error: Script restart attempt #35

both VMs are Ubuntu 14.04 running on Azure. I should note that I did not experience the same issues locally on my Macbook Pro running El Cap. I feel like I'm missing some flag?

I'm connecting to amqp://my.example.com

1 Answers1

0

you may need to set a heartbeat in your connection setting to keep the connection alive. try adding a heartbeat of 30 seconds, for example, and see if that helps.

you may also want to increase the connection timeout.

Derick Bailey
  • 72,004
  • 22
  • 206
  • 219