Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
We are using an application that has a defect and it is creating tons of files under the tmp dir.
We can delete the files, but the problem is that the process still has symbolic links to those files (under /proc/<pid>/fd and once deleted it is mentioned (deleted)).
This is causing a huge amount of symbolic links and eventually it reaches the system limitations.
Is there any way to delete those links? rm or unlink gives operation not permitted and we are pretty stuck with it.
This is IBM product and the defect is in axis2 code.
Hence I dont have a way to change it...
not sure what you mean by "drop"... those are .mar files that are not needed for anything.
I deleted them under the /tmp, but it doesnt remove the symbolic link in the /proc/<pid>fd
this is not a defect, this is how it works by design. A file is opened/accessed by processes and will be removed only when no process uses it any more _and_ it was deleted from the filesystem completely, including all the (possible) hard links.
In your case the process keeps the file open, so you can only really remove that file if the process already exited.
If you can force the process to close those files (without exiting) you can remove them without killing the process, but we do not know that process so we will not be able to tell you if that process works that way.
As a workaround regularly (daily or hourly) clean the /tmp files that are older than 1 day.
The symlinks in /proc/ are not real i.e. only occupy some bytes in memory.
The number is limited, see max files in /proc/<pid>/limits.
As a workaround regularly (daily or hourly) clean the /tmp files that are older than 1 day.
The symlinks in /proc/ are not real i.e. only occupy some bytes in memory.
You can remove the directory entries in /tmp, but the files will continue to occupy space until the process closes them.
Temp files are created whenever a new ConfigurationContext is created.
So create a ConfigurationContext **only once in a static block**
and use it in all the subsequent calls.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.