Client Temporary files are never deleted while the client is running. Deleting these files to resolve disk space allocated is not going to free up disk space as long as the client process still has handles to these files. On Unix it's important to understand:
- Temporary files are normally invisible unless the Save Temp Files (-t) startup parameter is specified which makes the temporary files visible during a session
- Without the Save Temp Files (-t) startup parameter, temporary files are not seen in the directory because they are created unlinked - this means that the file is only deleted once the process owning it ends
- When the system crashes and the UNIX file system recovery program fsck finds the files, which then need to be deleted.
- When the client terminates abnormally, using -t will preserve the temp-files, which then need to be deleted manually.
- Client Temp-files are always deleted if a client shuts down normally. Refer to Article The lbi file is left behind after a 4GL client session quits
- These temp-files are also created on the database server side, not only for the client-session. Refer to Article What are the temporary files used by the OpenEdge client?
Why are these Client-Temp files showing up as "deleted"?Deleting a file via rm or through a file manager application will
unlink the file from the file system's directory structure; however, if the file is still open (in use by a running process) it will still be accessible to this process and will continue to occupy space on disk.
It's up to the file system driver to free the allocated space. This will usually happen only once all
file descriptors referring to that file are released.
The space cannot be reclaimed until such time as the application closes the file by disconnecting the user.On Windows, client temporary files are always visible during a Progress session unless a Transparent Database Encryption (TDE) license is used. Windows will not allow open files to be deleted.
To improve the size of Client-Temp Files:
- Review the client memory side parameter values (-l, -mmax, -TM and -TB, -Bt and -tmpbsize) before these are swapped out to the disk temp-files.
- Add more space for client-side temp files. The -T parameter can be used to re-direct client-temp files from their usual location. These need the space they need from the application code design.
- Application Code review:
- Reduce the size of transactions and sub-transactions. Recursive loops will for example cause the lbi file to grow.
- Understand the record scope and transaction scope within your application in order to reduce it.
- The COMPILE LISTING option which will provide a view on record and transaction scope for each procedure.
- Enabling client logging could also help to identify the transaction scope at runtime. Example: