Empty /tmp folder?

6 posts by 2 authors in: Forums > CMS Builder
Last Post: May 19, 2014   (RSS)

By gversion - April 3, 2014

Hello,

I have received an automated alert from cPanel stating that my /tmp folder is reaching max capacity (approx. 500MB).

I realise this isn't very large but I would like to stop these automated alerts being sent to me and resolve the problem to ensure cPanel does not disable my website.

I can see the /tmp folder is full of session files (e.g. sess_ab8b4d361cd6793c02bee270aee49f89), which I think have been created by cmsBuilder.

Is it safe to delete all the contents of my /tmp folder?

Thank you,

Greg

By Dave - April 7, 2014

Hi Greg, 

The /tmp folder should be managed automatically by the operating system.  You might want to ask your host about it.  It shouldn't be reaching max capacity.

Those session files are just regular PHP session files.  So you can delete them, worst thing it will do is just erase someone's session (which would be like if they cleared their cookies or didn't come back to the site for a long time).  PHP or the OS should usually automatically clean up old session files.

You could also try just rebooting your server as their might be some automatic cleanup processes that run on shutdown/startup, but if that doesn't work check with your host to be sure.  

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By Dave - May 13, 2014

Hi Greg, 

> I am having thousands of session files created ranging from 19 bytes to 460kb!

This could be related to other websites hosted on your server (they will all use the same /tmp folder) or other php scripts you have on your website.

Can you try create a new folder for CMSB session files above your htdocs?  Or just give it a random name like /www/yoursite.com/htdocs/cmsSession_dj938923dh83/  

Then set that path under: Admin > General > session.save_path

That will cause CMSB and any pages that load the viewers to put their session files there and clean up old session files randomly once every 100 page views.

Let me know if that works for you and if you still see the big session files in that folder as well.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By gversion - May 17, 2014

Hi Dave,

Thanks so much for your advice. I am running on a VPS and I have just changed the location of the session path as you instructed.

I can see that the folder is immediately being loaded with session files so that will certainly imply it's my version of cmsBuilder and not someone else's software.

I have attached a JPG so you can see how many are being created.

There is definitely something weird going on. We are not getting anywhere near the sort of traffic that would be creating these user sessions... I wish we were!

Do you think you could take a closer look for me please?

Thanks again,

Greg

Attachments:

cmsSessions.jpg 219K

By Dave - May 19, 2014

Hi Greg, 

Yea, sure thing, can you email me CMS & FTP details to dave@interactivetools.com (don't post login details to the forum).  I can take a look at those files and see if I can figure out what is going on.  It definitely does look like something weird, might be malware or something like that, but I'll take a look and let you know.

PS: Also please include a link to this forum thread in your email for easy reference.  

Thanks,
Dave

Dave Edis - Senior Developer
interactivetools.com