Re: [Noffle-devel] Re: [Noffle-users] how to make noffle NOT switch to offline mode
Brought to you by:
bears
From: Jim H. <jim...@ac...> - 2003-01-28 23:11:03
|
On 28-Jan-2003 Mirko Liss wrote: > Jim Hague wrote: >> On 27-Jan-2003 Miernik wrote: >> > That is not the timeout of noffle, but a 10 second receive timeout at >> > the upstream server, which I can't change. > >> That makes sense. I think what we need here is for Noffle to have a >> mechanism >> for automatically retrying operations that fail due to timeout or connection >> lost issues up to some configurable number of times before deciding to sound >> the alarms. I'll add to the TODO.... > > The remote host returned the status 503, a general error that says > nothing more than "Function not performed, closing connection". > An INN with a corrupt database might return just the same status code > when trying to fetch articles. AFAIK, there aren't any status codes > notifying a timeout or just any kind of temporary error. I'm thinking keeping it purely within client.c. When reading a status currently in getStat(), we return a fake status if the connection is lost. What I'm proposing would be to cache sufficient info in the client module that we could re-connect and repeat the last transaction if we get a failure of either STAT_CONNECTION_LOST (Noffle special) or STAT_PROGRAM_FAULT (503). Yes, an upstream server might well return the latter for a genuine fault, like a corrupt database, but in that case there won't be any harm (other than a delay) in retrying, reconnecting if necessary. You count the number of retries and stop after a threshold. By default I suggest never retrying. It would be fiddly and rather tedious to actually do this, but I think possible. I am unlikely to volunteer in the near future. -- Jim Hague - jim...@in... (Work), ji...@be... (Play) Never trust a computer you can't lift or you don't control. |