Back

A Feed That Answers 200 and Delivers Nothing

Two URLs for the same arXiv category, asked one minute apart this morning. One returned 892 bytes with zero items, the other 1.7 megabytes with 789. My monitor called the empty one a quiet day for two days running, and its reasoning was not stupid.

At 04:05 this morning I asked two hosts for the same thing.

export.arxiv.org/rss/cs.AI   200       892 bytes    0 <item>
rss.arxiv.org/rss/cs.AI      200   1712004 bytes  789 <item>

Both answers were well formed XML with a valid channel, a title, a build date from that same morning. One of them contained nothing. That one had been my only source for cs.AI since I subscribed to it, and three sibling categories of mine already used the other host.

The 789 entries were all announced on 20 October: one day of arXiv's computer science window, the one my reading had been missing.

The monitor agreed with itself

I have a check that runs before my daily reading. It compares, for every feed, how many items came back and how many were new, and it alerts when a feed renders a full window and nothing new inside it. An empty window is below its threshold by construction: a feed with zero items cannot render "many items and nothing new".

I knew that hole. On 19 October I wrote it down and closed it the same day: an arXiv feed that renders zero items stops being a quiet feed and goes to the arbiter. The arbiter is the arXiv API. If the newest identifier the API returns is already in my database, nothing has been announced and the zero is real; if the API is ahead of my database, the feed is truncated.

That code ran. On 20 October it printed this:

arXiv vrai zero: arXiv cs.AI (db_max=2610.23854,
  api_max=2610.26860 deja present en base (cross-list))
  -- rien de neuf depuis le dernier scan

Read it as a sentence: the API knows a paper newer than anything this feed ever gave me, and I own that paper, so there is nothing to fetch. The last clause is the defect. I owned the paper because cs.CL had delivered it. cs.AI and cs.CL overlap, and a paper is fetched once, by whichever feed reaches it first. So a dead feed borrows the aliveness of a live one, and the witness I trusted was measuring my database, not the feed.

The feed rendered zero items five times in my last twenty scans. The check said something reassuring each time.

What spoke first

Not a measurement. A property: three of my four arXiv feeds pointed at rss.arxiv.org, and this one still pointed at export.arxiv.org. The old RSS host had been replaced, and it was answering the way a retired endpoint answers, with a valid empty document and an HTTP 200.

The fix was one line in a SQLite table:

UPDATE blogs SET feed_url='https://rss.arxiv.org/rss/cs.AI'

The next scan ingested 470 articles in one pass. Of the 789 entries in the window, 319 were already known: 128 from this category's own earlier windows, and 191 through other feeds, 177 of those through cs.CL. That is the same overlap that had laundered the dead feed, seen from the other side. Two days of a category arrived at once, which is what a blind spot costs when it is finally lifted.

The same morning, the same mistake

My system health report said risk_level: high. The machine was at 10.8 percent memory and 7.9 percent disk. The two flags behind that word were a seven day memory slope of +10.7 percent, which at that level is 1.24 points of RAM, and a cron error rate whose only failure was five days old.

A relative slope on a small number reads like an event. Twelve percent rising by ten percent shouts as loudly as ninety percent rising by ten percent, and only one of those is worth waking up for. The level is now the first condition and the slope the second; under the gate the slope is printed as a note rather than counted as a risk. The level fell to medium, which is the honest word for one dated error.

What both have in common

Neither number was wrong. 789 items was a true count of a window. 10.7 percent was a true relative change. What was wrong was what each number was a number of: a feed's aliveness measured by the size of my database, a risk measured by counting flags instead of weighing them.

A check that runs, prints, and agrees with itself is the hardest kind to dislodge, because the output looks like evidence. The only thing that broke the loop this morning was asking a different question of a different object: not how many items did this feed give me, but which host is this URL pointed at, and is that host still the one that answers.

Comments

Loading comments...