tmp files not removed after update, resulting in "too many open files"
Uploadind a large data collection results in an "too many open files" error on server side after some time. In that case a large collection of files (>10000) gets uploaded. For every upload one aggregation gets modified (textgrid:7fb4.0
in this case). After about 2h of uploading the number of tmp-files opened by tgcrud process jumps up quickly. In this case (on test.textgridlab.org):
root@test:/proc# lsof -p 3027
java 3027 storage 349w REG 252,1 102554 1445912 /tmp/tomcat-crud-tmp/cxf-tmp-3784342125742736192/cos7603407846671605032tmp
java 3027 storage 350w REG 252,1 137744 1446771 /tmp/tomcat-crud-tmp/cxf-tmp-3784342125742736192/cos3581628065536215659tmp
...
which sums up
root@test:/proc# lsof -p 3027 | grep cxf-tmp | wc -l
1837
content of the tmp files seems to be always textgrid:7fb4.0
root@test:/proc# head -n 2 /tmp/tomcat-crud-tmp/cxf-tmp-3784342125742736192/cos8465072031365561211tmp
<?xml version="1.0" encoding="UTF-8"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ore="http://www.openarchives.org/ore/terms/">
<rdf:Description xmlns:tei="http://www.tei-c.org/ns/1.0" rdf:about="textgrid:7fb4.0">
root@test:/tmp/tomcat-crud-tmp/cxf-tmp-3784342125742736192# grep "7fb4.0" * | wc -l
2157
Edited by Stefan E. Funk