#1846 Don't 500 on amqp errors

v1.0.0
closed
sf-1 (616)
General
nobody
2015-08-20
2011-03-31
No

Since we don't necessarily need amqp to be fully reliable, handle its errors better. The error below was happening on most of the sfn-web heads, and restarting apache on them fixed it.

We can capture this error and log it and continue. Also, we may want to have polling in place in addition to amqp, for cases like this when talking to amqp isn't working.

Module allura.model.monq_model:120 in post
<<          session(obj).flush(obj)
               if g.amq_conn:
                   g.amq_conn.queue.put('')
               return obj
>>  g.amq_conn.queue.put('')
Module kombu.simple:66 in put
<<                                headers=headers,
                                     compression=compression,
                                     **kwargs)

           def clear(self):
>>  **kwargs)
Module kombu.messaging:129 in publish
<<                                          headers=headers)
               return self.exchange.publish(message, routing_key, mandatory,
                                            immediate, exchange=exchange)

           def revive(self, channel):
>>  immediate, exchange=exchange)
Module kombu.entity:206 in publish
<<                                            routing_key=routing_key,
                                                 mandatory=mandatory,
                                                 immediate=immediate)

           def delete(self, if_unused=False, nowait=False):
>>  immediate=immediate)
Module amqplib.client_0_8.channel:2223 in basic_publish
<<          args.write_bit(immediate)

               self._send_method((60, 40), args, msg)
>>  self._send_method((60, 40), args, msg)
Module amqplib.client_0_8.abstract_channel:70 in _send_method
<<          self.connection.method_writer.write_method(self.channel_id,
                   method_sig, args, content)
>>  method_sig, args, content)
Module amqplib.client_0_8.method_framing:233 in write_method
<<          payload = pack('>HH', method_sig[0], method_sig[1]) + args

               self.dest.write_frame(1, channel, payload)

               if content:
>>  self.dest.write_frame(1, channel, payload)
Module amqplib.client_0_8.transport:125 in write_frame
<<          size = len(payload)
               self._write(pack('>BHI%dsB' % size,
                   frame_type, channel, size, payload, 0xce))
>>  frame_type, channel, size, payload, 0xce))
Module socket:1 in sendall
error: [Errno 32] Broken pipe

Discussion

  • Dave Brondsema

    Dave Brondsema - 2011-04-01
    • size: --> 1
    • milestone: backlog --> apr-7
     
  • Dave Brondsema

    Dave Brondsema - 2011-04-01
    • size: --> 1
    • milestone: backlog --> apr-7
     
  • Rick Copeland - 2011-04-04

    Also on rc/guano-tickets

    QA: on sandbox, shut off rabbitmq, then try to modify an artifact. should log a warning to allura.log and continue on its merry way.

     
  • Rick Copeland - 2011-04-04
    • status: open --> code-review
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2011-04-04
    • status: code-review --> closed
     

Log in to post a comment.