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

[jira] [Resolved] (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:all-tabpanel ]

Tim Allison resolved TIKA-3208.
-------------------------------
    Fix Version/s: 1.25
       Resolution: Fixed

Thank you for opening this issue and tracking down the source of the problem.

> 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)