This week I received a frantic email and follow up message from someone regarding out of control PDX files that could not be cleaned up. Let’s have a look at the meat of the email:
Comment or Message I cannot delete PDX folders/files in the Windows Temp folder after they have been created because the system says the files are being used by the javaw.exe program. This is eating up critical disk space and I do not know where to kill the javaw processes for each PDX.
Where are these processes being held? This is urgent and is stopping new product releases! IT apparently is not aware of how to kill these processes, nor wanting to add more drive space! Please help!
If Agile is installed using the operating system’s temp location, that location is owned by the operating system, not Agile PLM, therefore it may have problems deleting content. In the original email, you will see a reference to javaw. This would be the Java executable running Weblogic. Fortunately, this is a super easy fix and everything you need to know can be found in the Oracle knowledge base entry “How to Change the Temp Directory that Agile PLM Application Server Uses to Extract Temp Files for its Operations (Doc ID 855594.1)”.
Changing Agile’s temp directory in Windows
Change the c:\windows\temp\agilepc9extract temp directory:
- Create a directory under C:\ , for ex. C:\mydir
- Stop the application server
- Run agileDomain\bin\UninstalllService.cmd to stop and uninstall Agile PLM service.
- Add -Djava.io.tmpdir=C:\mydir to Java options (CMDLINE) in installService.cmd located under [Agile Home]\agileDomain\bin , as shown in example below:
- Run InstallService.cmd to install Agile PLM service.
- Start Agile.
set CMDLINE=”-server -XX:MaxPermSize=256M -ms1280M -mx1280M -XX:NewSize=256M -XX:MaxNewSize=256M -Dweblogic.Stdout=%STDOUT% -Dweblogic.Stderr=%STDERR% -classpath \”%CLASSPATH%\” %JMX_SET% -Dweblogic.Name=<hostname>-AgileServer \”-Dbea.home=C:\bea\” -Dweblogic.management.username=%WLS_USERNAME% -Dweblogic.management.password=%WLS_PW% -Dweblogic.ProductionModeEnabled=%STARTMODE% \”-Djava.security.policy==C:\bea\wlserver_10.3/server/lib/weblogic.policy\” -Dagile.log.dir=C:\Agile\Agile931/agileDomain/servers/myserverver-AgileServer/logs -Dlog4j.configuration=file:.\config\log.xml -Djava.io.tmpdir=d:\temp weblogic.Server“
Changing Agile’s temp directory in Linux
- Add this paramter to the Weblogic-AgilePLM startup scripts like startAgile.sh: -Djava.io.tmpdir=/opt/Agile935/tmp
- Create a tmp folder inside of the Agile PLM home dir for ex, /opt/Agile935, with all read/write/execute permissions for the OS user that installed Weblogic and Agile PLM,
- Restart the Weblogic-AgilePLM process after adding the above parameter and check the location /opt/Agile935/tmp for Agile related files like AgilePC9Extract being logged as server starts up. This proves the new default temp location for Weblogic-AgilePLM process is changed to /opt/Agile935/tmp instead of /tmp
For Example: -server -XX:MaxPermSize=256M -ms1280M -mx1280M -XX:NewSize=256M -XX:MaxNewSize=256M -Dweblogic.Name=-AgileServer \”-Dbea.home=¾A_HOME%” -Dweblogic.management.username=%WLS_USERNAME% -Djava.io.tmpdir=/opt/Agile935/tmp -Dweblogic.management.password=%WLS_PW% -Dweblogic.ProductionModeEnabled=%STARTMODE% \”-Djava.security.policy==¾A_HOME%\wlserver_1x.x/server/lib/weblogic.policy\” -Dagile.log.dir=%Agile_Home%/agileDomain/servers/-AgileServer/logs -Dlog4j.configuration=file:.\config\log.xml -Djava.io.tmpdir=d:\temp weblogic.Server”