Disk space is not freed in Weblogic even after deleting huge number of files

We had a SOA service which uses mail server to send notifications. One day, mail server went down and this triggered huge amount of log messages in server.out log file. Soon we got monitoring alert saying disk space is 90%. Out log files more than 1 GB size got created. We have had cleared lot of server.out log files. Surprisingly, it didn’t reclaim any space and disk utilization was keep on climbing. 

We ran lsof command and grep for server.out file.
[oracle@abcd logs]$ lsof -p 6913 | grep soa_server1.out
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
      Output information may be incomplete.

java    6913 oracle    1w      REG              249,0 655131937   3283212 /u01/data/domains/soa_domain/servers/soa_server1/logs/soa_server1.out (deleted)
java    6913 oracle    2w      REG              249,0 655131937   3283212 /u01/data/domains/soa_domain/servers/soa_server1/logs/soa_server1.out (deleted)
Output showed that process still hold on to file even though it was deleted. Little google search revealed that Liux OS keeps the file on disk as long as process keeps file open. So, only the way to reclaim the space is restart server process.
It is not feasible/advisable to restart product servers always. So, we decided to truncate files using Linux truncate command going forward. Using below command we can make files size to zero. This will clear the space used by out log files and will give us some time to investigate issue.
truncate –size 0 soa_server1.out*
Weblogic keeps .out files open even after rotating. This is not the case with diagnostic and .log files. Looks like some weblogic bug.

Comments

Popular posts from this blog

HOW WE REDUCED SOA OSB PROVISIONING FROM 4 DAYS TO 4 HOURS

NOT ABLE TO START RABBITMQ CLUSTER: CANNOT DECLARE A QUEUE ‘~S’ ON NODE ‘~S’: ~255P

SOA SUITE 12.2.1.4 INSTALLATION: GOT EXCEPTION WHEN AUTO CONFIGURING THE SCHEMA COMPONENT(S) WITH DATA OBTAINED FROM SHADOW TABLE