You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Allison, Timothy B." <ta...@mitre.org> on 2014/06/19 21:00:15 UTC

tika-server exception handling

All,

As part of Tika-1302/TIKA-1330,  I'm looking into exception handling in tika-server.  Specifically, I'd like to add a TikaServerDaemon that starts Tika server in a separate process (not thread) and can restart it when necessary.  This is somewhat based on an idea from William Palmer (http://www.openplanetsfoundation.org/blogs/2014-03-21-tika-ride-characterising-web-content-nanite).   With a daemon/watcher/restarter in place,   

1) If a parser causes an OOM Exception or any type of Error , should we shut the server down?

2) Are there other exceptions that are serious enough to warrant shutting down a server?

3) If X number of parsers hang for longer than Y millis, should we shut the server down?

I won't make any changes until after 1.6 is released, and the default behaviors will all remain in place, but I wanted to get feedback from the community to make sure that I'm on a track that makes sense.

Thank you.

       Best,

             Tim


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Thursday, June 19, 2014 12:01 PM
To: dev@tika.apache.org
Subject: Re: Is TikaExceptionMapper in tika-server actually used?

Hi Tim, sorry for a delay,
I can see it is expected to process a checked exception, so unless we 
have one of the root resources throwing it from one of the methods then 
it is not used

Thanks, Sergey
On 19/06/14 02:22, Allison, Timothy B. wrote:
> All,
>
>    In working on adding the stacktrace from a parse exception to the server response, I'm trying to find the most jax-rsly elegant way of handling exceptions.  There seems to be a bit of duplicated code, some with good reason, for exception handling.  Is TikaExceptionMapper actually used by anything?  If not, should I try to modify code to use it or something similar to it?
>
>     Thank you.
>
>             Best,
>
>                  Tim
>


Re: tika-server exception handling

Posted by Nick Burch <ap...@gagravarr.org>.
On Thu, 19 Jun 2014, Allison, Timothy B. wrote:
> I won't make any changes until after 1.6 is released, and the default 
> behaviors will all remain in place, but I wanted to get feedback from 
> the community to make sure that I'm on a track that makes sense.

The only precident that springs to mind is the work Jukka did a while back 
on the forked parser. Not sure how close that is though, but might be 
worth a quick peek if nothing else springs to mind!

Nick