Apache2 - have to restart apache2 process every 10 mins to clear /tmp directory....
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Apache2 - have to restart apache2 process every 10 mins to clear /tmp directory....
I have been working on this for a few hours now and still haven't been able to track down whats going on.
I just switched servers and put a fresh debian install on with apache2 + custom suexec + php5(fcgi).
now when i upload a file to the site it wont upload, so i tracked down the issue. its the /tmp directory that root tmp. its at 100% so i restart the /etc/init.d/apache2 process and the /tmp directory is automagically cleared to 20% used and i can upload again. so i figure ok its got to be a setting. i looked in all the conf files conf.d the php5 conf files and no where do i have a /tmp directory set. so i think OK I can build a cron to clear the tmp directory every 10 mins till i find the issue, but alas, when i go into the tmp directory There are NO files to delete!!! wtf. holy crap. and all that goodness, this is crazy, how can you have a tmp directory that is not being written to, from all i can see, so i think ok it might be a hard link, i checked, in all root and sub root directories no hard links to tmp, no soft links to temp either. and if i sit in my /tmp directory and do a df -h after some uploads its going from 20% so 23% and up, but i do ls -alh and nothing, then ls -al and watch bytes, nothing , so this is very strange. has anyone encountered something like this? is it possible that this is a hard link thats hidden somewhere or some other extreme function i have never heard of?
thanks for anyone's help, i really appreciate it,
-=Levi=-
Yeah I know, but i dont have the time to sit there and df -h every few minutes to know when to reset apache, there are users uploading all the time unfortunately, so tmp gets loaded up quick. i am using a apache2 mod-worker with fcgi/php5 setup so i was thinking it could be something in php5 that is using tmp, but the lack of any files appearing in /tmp is very very strange.
Oh and so you know there are no files in /tmp to be deleted, the only thing that seems to clear out /tmp is to run /etc/init.d/apache2 restart. as well if i add files to /tmp, the df -h shows the increase in usage.... soo freakin weird. I != grock(apache2 tmp)
du -h didnt return anything of note, it had a few 10k files but nothing in the megs, but % on temp was 40% of 480M so i did the lsof | grep tmp and got quite an interesting return
it appears xcache isnt cleaning up after itself however i cannot see these hidden files in tmp. and the list says (deleted) so how does that work? im gonna check my settings in xcache and see if i can tweak it a bit to stop giving this error.
it was xcache in php5, so i went into the xcache settings and changed the xcache.mmap_path to the tmp dir in home.
thanks for that lsof hint there, shoulda though of that much thanks.
Glad you got it resolved. As a side note, your /tmp is obviously too small for a server. If you're using LVM (and have extra space), you might consider increasing it to ~1GB.
yar, I'm gonna do that, the hosting company we go with actually setup the partitions, so i have to reconfigure on new setups, i actually get to have some fun tomorrow, getting a load balanced setup with a bunch more servers. definitely going to rock. luckily i figured this one out before moving it to a large setup that coulda been waayyyy too much fun.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.