Monday, June 14, 2021

// // 1 comment

How to change temporary (temp) directory in Oracle Essbase Server

Recently we got a critical alert where /tmp directory on our Essbase Linux server (Version: 11.1.2.4.033) was utilizing more than 90% of total allocated space. When we checked, there were many temporary Outline(.otl) files created under the /tmp directory. Most of them were of few KBs size but couple of files were really huge-sized of around 2gb each causing this space crunch alert under /tmp directory. Below is some of those huge sized .otl files listed:
-rw-r----- 1 epmadmin sapsys 2049736704 May 22 12:39 0oKEzW.otl
-rw-r----- 1 epmadmin sapsys 1370583040 May 22 07:43 MsnP8R.otl
-rw-r----- 1 epmadmin sapsys 2049994752 May 22 12:53 spQfrr.otl
-rw-r----- 1 epmadmin sapsys 1360232448 May 22 07:43 wpWopg.otl
Temp directory mostly contains files that are required temporarily. Many Essbase activities use this to create lock files and for temporary storage of data. When an Essbase outline is opened, it creates such temp files. Other activities like HPCM application deployment to Essbase and FDMEE data load to Essbase, Metadata load to Essbase etc. also can create these temporary files. 

Usually, Essbase doesn't produce such huge sized temporary files. Mostly you will see the size in KBs only for such temp files. These temporary files are normally deleted automatically when the related operation is over. But on some occasions you will observe they are not automatically deleted.

We noticed that when these huge sized temporary files (around 2gb per file) are created under /tmp directory on Essbase Linux server, it not only causes /tmp directory go out of space with 100% utilization but also the following issues encountered at the same time:
  1. Essbase server gets hanged.
  2. FDMEE data load to Essbase gets failed.
  3. Unable to load Essbase applications in FDMEE 'Target Application' interface.
Apart from the above listed ones, there might be even more problems. All in all, these issues point towards 'Essbase server disconnection' at that particular point of time. 

So in order to fix it, as a temporary workaround, we moved all those huge-sized temporary .otl files from /tmp directory to some other location and it fixed all the issues. You can also delete these temp files, if not required.

In a Windows server, the temporary directory is set by the environment variable TEMP. In UNIX/LINUX server, the temporary directory is /tmp filesystem. As /tmp is a Linux/Unix OS Filesystem, it is not recommended to use OS file system for application usage because it may lead to even server crash if all /tmp space is consumed at any point of time. So the safe way out is to have a separate temp folder assigned for Essbase application usage other than OS /tmp directory.

Workarounds

As mentioned above, instant workaround is to move/delete these temporary files to clear up some space under /tmp directory.

But as a permanent fix, we decided to have a separate temp directory assigned to Essbase application, that we will discuss ahead.

Changing the Default Location for Essbase Temporary Files on Linux Platforms:

On Linux platforms, Essbase uses OS /tmp directory as the default location for creating temporary files.

To create temporary files in a different location, you must set the temp directory environment variable in opmn.xml and in setEnv.sh configuration files.

To set TEMP/TMP environment variable in opmn.xml

1- Find opmn.xml file on your Essbase server located at below path: /apps/oracle/epm/Middleware/user_projects/epmsystem_ess/config/OPMN/opmn/opmn.xml

2- In opmn.xml file, look for the following default entries:
<environment>
<variable id="TEMP" value="/tmp"/>
<variable id="TMP" value="/tmp"/>
</environment>
3- Change the default values of TEMP and TMP variables to your desired location as shown below and save the opmn.xml file :
<environment>
<variable id="TEMP" value="/apps/oracle/epm/Middleware/user_projects/epmsystem_ess/tmp"/>
<variable id="TMP" value="/apps/oracle/epm/Middleware/user_projects/epmsystem_ess/tmp"/>
</environment>

To set TMPDIR in setEnv.sh

1- Find setEnv.sh file on your Essbase server located at below path: /apps/oracle/epm/Middleware/user_projects/epmsystem_ess/bin/setEnv.sh

2- By default there will be no entry set for TEMPDIR in setEnv.sh (means your OS /tmp directory will be used to store temporary files). 
To change the default location, add the following entry at the end of setEnv.sh file and save it:
TEMPDIR="/apps/oracle/epm/Middleware/user_projects/epmsystem_ess/tmp"
export TEMPDIR
Note: You have to restart Essbase services to make these changes effective.

That's all for this post.
I hope this article has helped you. Your suggestions/feedback are most welcome.
Keep learning and Have a great day!!!

Share this post:

1 comment: