Timeout error

17 views
Skip to first unread message

Rafael Santos

unread,
Jul 4, 2019, 5:56:38 AM7/4/19
to Ruby RabbitMQ libraries
Hello,

We're trying to publish and event through our rails application, however it keeps timing out. When we publish the exact same event from the rails console, it works fine. It's just from the app that the error happens.

Has anyone come across this issue?

Stacktrace:

Timeout::Error - Timeout::Error:
  lib/message_queue/publisher.rb:28:in `exchange'
  lib/message_queue/publisher.rb:21:in `publish'
  app/events/event.rb:5:in `publish'
  app/controllers/listings_controller.rb:64:in `track_listing_page_view'
  app/middlewares/amplitude_session_catcher.rb:26:in `call'

Michael Klishin

unread,
Jul 4, 2019, 6:04:14 AM7/4/19
to Ruby RabbitMQ libraries
It's hard to suggest something specific without seeing what lib/message_queue/publisher.rb does and knowing
whether this can be reproduced quickly or takes hours or days in a production environment. Please elaborate.

If it happens in production then it might be the simple fact that timeouts in distributed systems are
going to happen at some point. If it happens repeatedly in a short lived development environment, the list of possible causes
would be quite different.

[1] explains a few Web server-specific threading topics but the issue can be as basic as connection loss that hasn't been detected yet [2].
Applications, and in particular publishers, should take care of reopening their connections and using publisher confirms for data safety [3][4].

See server logs for additional clues [5].

Reply all
Reply to author
Forward
0 new messages