[hack] Try to prevent try_catch log spam by limiting consecutive exceptions
[hack] Try to prevent try_catch log spam by limiting consecutive exceptions

Summary:
Sometimes, we end up retrying the same thing which rethrows on every
retry loop. This log-spams until the hard disk is filled up.

This ameliorates this problem a bit by halting the server
on 500 consecutive retries.

Reviewed By: CatherineGasnier

Differential Revision: D6730229

fbshipit-source-id: 4ddc6871665104ba3f2acd32ff81cce3eb165b1a

mroch/flow,samwgoldman/flow,gabelevi/flow,popham/flow,claudiopro/flow,samwgoldman/flow,AgentME/flow,nmote/flow,samwgoldman/flow,mroch/flow,facebook/flow,AgentME/flow,claudiopro/flow,jamesgpearce/flow,gabelevi/flow,samwgoldman/flow,nmote/flow,AgentME/flow,popham/flow,JonathanUsername/flow,jamesgpearce/flow,samwgoldman/flow,jamesgpearce/flow,gabelevi/flow,mroch/flow,JonathanUsername/flow,JonathanUsername/flow,mroch/flow,gabelevi/flow,JonathanUsername/flow,claudiopro/flow,samwgoldman/flow,AgentME/flow,facebook/flow,nmote/flow,nmote/flow,AgentME/flow,popham/flow,mroch/flow,claudiopro/flow,jamesgpearce/flow,popham/flow,JonathanUsername/flow,gabelevi/flow,mroch/flow,gabelevi/flow,nmote/flow,jamesgpearce/flow,mroch/flow,popham/flow,popham/flow,jamesgpearce/flow,JonathanUsername/flow,facebook/flow,gabelevi/flow,JonathanUsername/flow,facebook/flow,nmote/flow,nmote/flow,samwgoldman/flow,facebook/flow,claudiopro/flow,jamesgpearce/flow,popham/flow,facebook/flow,facebook/flow