Zomis / Duga

Stack Exchange Chat bot
18 stars 6 forks source link

Nothing gets posted to the chat anymore once it went down #47

Open skiwi2 opened 10 years ago

skiwi2 commented 10 years ago

If the SE chat went down, even for a brief period of a time, then the bot will not work anymore until it is rebooted.

Zomis commented 9 years ago

The same goes for the bot itself sometimes, for example when this log message appears in Tomcat:

17-Jan-2015 19:35:32.182 INFO [http-nio-80-exec-7] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.

Vogel612 commented 9 years ago

Looks like the Responsible thread terminating is the cause of this. It could be remediated by restarting the thread, given it terminates. It might be sufficient to alternatively wrap the executed code into a pokémon-catch and selectively rethrow

Zomis commented 9 years ago

@Vogel612 from what I have noticed so far, there is no real place to put a pokemon-catch. The logging shown above is from this method:

    @ExceptionHandler(Exception.class)
    @ResponseStatus(HttpStatus.BAD_REQUEST)
    public void handleException(final Exception ex, final HttpServletRequest request) {
        LOGGER.log(Level.SEVERE, "exception", ex);
    }

i.e. there is no "rethrowing" going on that I have been able to locate.