AMQP: Avoid deluge of stack traces on errors
Two errors I encountered resulted in an enormous number of stack traces, destroying the utility of the logs and making it hard to understand what was wrong.
these are both very common, since you may need to restart the broker or peer, and if you have two processes, they have to start in some order so one of them won't see the other yet. On some deployment setups you might not be able to control the order of startup.
If a broker is missing I would say you should get one log message (probably no trace; this isn't an exceptional condition or bug really). Then another log message when it reappears.
Similarly if a queue is missing with RPC, it should just automatically wait for the queue, logging only once.
The worst aspect of the tons of traces in the logs is that it isn't really clear from them what the problem is. It'd be much more useful if it just said "can't connect to broker"
- broker is not present; for example if you forgot to start it, or if you need to restart it.
- RPC peer is not present (missing queue); for example, if it didn't start yet
these are both very common, since you may need to restart the broker or peer, and if you have two processes, they have to start in some order so one of them won't see the other yet. On some deployment setups you might not be able to control the order of startup.
If a broker is missing I would say you should get one log message (probably no trace; this isn't an exceptional condition or bug really). Then another log message when it reappears.
Similarly if a queue is missing with RPC, it should just automatically wait for the queue, logging only once.
The worst aspect of the tons of traces in the logs is that it isn't really clear from them what the problem is. It'd be much more useful if it just said "can't connect to broker"
Leave a comment
on 2011-10-07 23:11 *
By viktorklang
Summary changed from Avoid deluge of stack traces on errors to AMQP: Avoid deluge of stack traces on errors
Updating tickets (#1129, #1132, #1138, #1149, #1153, #1154, #1157, #1161, #1163, #1168, #1170, #1171, #1172, #1176, #1177, #1178, #1180, #1199, #1217, #1218, #1219, #1237, #1238, #1239, #1244, #1246, #1249, #1250, #1251, #1252, #1256, #1301, #1302, #1306, #1395, #1396, #1409, #1418, #455, #891, #895, #912, #956, #972, #1031, #1374, #880, #1125, #1146)