You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Darren Cooper (Jira)" <ji...@apache.org> on 2020/10/09 22:26:00 UTC

[jira] [Commented] (TIKA-3208) tika-server Detect when using fileUrl header does not close the file handle

    [ https://issues.apache.org/jira/browse/TIKA-3208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211446#comment-17211446 ] 

Darren Cooper commented on TIKA-3208:
-------------------------------------

Thank you.  That was a quick turnaround. 

Is there a date for 1.25 to be released?

> tika-server Detect when using fileUrl header does not close the file handle
> ---------------------------------------------------------------------------
>
>                 Key: TIKA-3208
>                 URL: https://issues.apache.org/jira/browse/TIKA-3208
>             Project: Tika
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 1.23, 1.24, 1.24.1
>         Environment: Centos 7
> java 1.8
>  
>            Reporter: Darren Cooper
>            Priority: Major
>             Fix For: 1.25
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When using the fileUrl header to detect a file on localdisk the java process does not release the file handle.
> When the detected file is deleted, the disk space is not released because of the open file handle.
> Test
> curl -X PUT -H "fileUrl: file:///root/test.pdf" [http://localhost:9998/detect/stream]
> rm /root/test.pdf
> lsof of (pid of java tika-server)--
> file handle open to /root/test.pdf (deleted)
>  
> As a test fix tika-server/src/main/java/org/apache/tika/server/resource/DetectorResource.java was modified to add
> try {
>  tis.close();
>  } catch (Exception e) {}
>  
> to the finally blcok in public detect and the problem seemed to be resolved.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)