TemporaryAssetFolder seems to keep directories FD open.
TemporaryAssetFolder close properly deletes the folder in question, but it appears that the DIR itself is kept an FD reference to with the java process. This needs to avoided.
$ lsof -a -p 1
java 1 root *886r DIR 0,348 0 669288668 /tmp/tmp8241906271717039969 (deleted)
java 1 root *887r DIR 0,348 0 668806799 /tmp/tmp2752845612768435323 (deleted)
java 1 root *888r DIR 0,348 0 668806799 /tmp/tmp2752845612768435323 (deleted)
java 1 root *890r DIR 0,348 0 669371211 /tmp/tmp8773006157366078093 (deleted)
java 1 root *891r DIR 0,348 0 669371211 /tmp/tmp8773006157366078093 (deleted)
java 1 root *892r DIR 0,348 0 669371304 /tmp/tmp2159347330578983220 (deleted)
java 1 root *893r DIR 0,348 0 669371304 /tmp/tmp2159347330578983220 (deleted)
java 1 root *894u IPv6 669662437 0t0 TCP proc-microthumb-8545bc9565-l4vkv:58728->es-logs-elasticsearch-client.default.svc.cluster.local:9200 (ESTABLISHED)
java 1 root *895r DIR 0,348 0 669531418 /tmp/tmp7891401609062151701 (deleted)
java 1 root *896r DIR 0,348 0 669531418 /tmp/tmp7891401609062151701 (deleted)
java 1 root *897r DIR 0,348 0 669912151 /tmp/tmp16956140217414050366 (deleted)
java 1 root *898r DIR 0,348 0 669912151 /tmp/tmp16956140217414050366 (deleted)
java 1 root *899r DIR 0,348 0 669862109 /tmp/tmp16801653483813321223 (deleted)
java 1 root *900r DIR 0,348 0 669289334 /tmp/tmp12132334652795670143 (deleted)
java 1 root *901r DIR 0,348 0 669289334 /tmp/tmp12132334652795670143 (deleted)
java 1 root *902r DIR 0,348 0 669290261 /tmp/tmp13199172138195595148 (deleted)
java 1 root *903r DIR 0,348 0 669290261 /tmp/tmp13199172138195595148 (deleted)
java 1 root *904r DIR 0,348 0 670056599 /tmp/tmp12188096629066964938 (deleted)
java 1 root *905r DIR 0,348 0 670056599 /tmp/tmp12188096629066964938 (deleted)
java 1 root *906r DIR 0,348 0 669466265 /tmp/tmp16913966921995807487 (deleted)
java 1 root *907r DIR 0,348 0 669466265 /tmp/tmp16913966921995807487 (deleted)
java 1 root *908r DIR 0,348 0 670255773 /tmp/tmp4575433860808760312 (deleted)
java 1 root *909r DIR 0,348 0 670255773 /tmp/tmp4575433860808760312 (deleted)
Etc.
Edited by Stein Eldar Johnsen