Posted 3 months ago

Short URL

Notes

Sporadic Publishing Failures

The last few days we have been receiving reports from some users that some of the items in their feeds do not show up on their wall although they are reported as published from RSS Graffiti.

We have been investigating this issue since yesterday and we managed to identify the reason this was happening. A Facebook API call (namely streamPublish) returns an unexpected response which was tricking our processing engine in thinking that the item was published when in fact we did not get a valid answer from Facebook and the fate of the published story could not be safely determined.

The Facebook API call in question is supposed to return the ID of the posted story or throw an exception if something went wrong and posting has failed. Since we do not need the ID of the posted story, we used to ignore it and unless an exception was thrown we assumed that the story has been published.

For the past few days this is not the case anymore. StreamPublish can return an invalid (empty) ID for the published story. This behavior is not documented and is probably a bug since it carries no information on what happened to the story that has been posted.

Today we altered the way we handle this call and we now examine the ID of the posted story as returned by Facebook. If it is empty (invalid) we assume that we hit this bug again and that we will have to retry the operation. To avoid changing the posting workflow in the feed processing engine of RSS Graffiti we decided not to retry posting immediately but rather to leave it for the next time the feed is processed. So what we actually do is interrupt the posting of the target (wall) that encountered the problem and move on to the next target. The target that was interrupted will be processed again in a few minutes and posting will continue from the point it stopped last time.

There are pros and cons in this approach and we are really not sure what is the best thing to do.

The two scenarios (solutions) of handling this situation are:

  1. Ignore the story that failed and move on to the next story.
  2. Interrupt processing and retry posting this story in the next cycle.

Solution 1 has the advantage that all the feeds that don’t hit this bug will be posted as soon as possible. The disadvantage is that the story that failed in the first effort will never make it to your wall if any newer stories are published successfully right after it on the same target.

Solution 2 has the advantage of having another chance to get all your stories on your wall in the right order but the disadvantage of a longer delay.

Of course there are more possible solutions to this problem but they fall out of the scope of a workaround. We don’t really need to start implementing any long term solutions since this issue is caused by a Facebook bug (rather than a feature). So as soon as Facebook fixes this things should go back to normal and the fix we are using now will stay in place just in case.

While this issue was being investigated today Facebook was reporting in it Platform Live Status that it is facing API Issues. The problem we are investigating might be related to the problems reported by Facebook but there is no way of confirming this for the moment.

We will keep monitoring and working on this issue until it does not affect us anymore.