I think the root cause is the 503 on the server side,
but apt-listbugs is dealing with it poorly because
it discards all partial results and starts over from
scratch after querying the user. Instead it should
retry the failed operation only and continue, and only
error out when the number of failures exceeds some count.

This change is not a full solution but illustrates the problem:

--- /usr/lib/ruby/vendor_ruby/aptlistbugs/debian/bts.rb.orig    2026-01-26 
15:13:55.765842765 +0100
+++ /usr/lib/ruby/vendor_ruby/aptlistbugs/debian/bts.rb 2026-01-26 
15:14:43.343807240 +0100
@@ -75,14 +75,24 @@
           names.each { |nm|
             sa << nm
             if sa.length >= querystep
+              begin
               soap.get_bugs('severity', severities,
                              'package', sa).each { |b| reqbugs << b }
+              rescue
+                sleep 1
+                retry
+              end
               sa = Debian::BTSSOAP::StringArray.new
             end
           }
           if sa.length != 0
+              begin
             soap.get_bugs('severity', severities,
                            'package', sa).each { |b| reqbugs << b }
+              rescue
+                sleep 1
+                retry
+              end
             sa = Debian::BTSSOAP::StringArray.new
           end

@@ -96,7 +106,12 @@
           reqbugs.each { |bug|
             sa << bug
             if sa.length >= parsestep
+              begin
               soap.get_status(sa, ma_copies).each { |b| bugs << b }
+              rescue
+                sleep 1
+                retry
+              end
               offset_i += sa.length
               sa = Debian::BTSSOAP::StringArray.new
               pct = "#{((offset_i).to_f*100/max.to_f).to_i}%"

Reply via email to