Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Session files not being removed #1259

franciscopaniskaseker opened this issue Aug 15, 2017 · 4 comments

Session files not being removed #1259

franciscopaniskaseker opened this issue Aug 15, 2017 · 4 comments


Copy link

Operating System (OS/VERSION):

root@painel:~# cat /etc/issue
Debian GNU/Linux 8 \n \l

root@painel:~# uname -a
Linux ****** 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

VestaCP Version:

root@painel:~# dpkg -l | egrep -i vesta
ii vesta 0.9.8-17 amd64 Vesta
ii vesta-nginx 0.9.8-16 amd64 Vesta Nginx
ii vesta-php 0.9.8-17 amd64 Vesta php-fpm

Installed Software (what you got with the installer):

(apache+nginx) + php + exim + bind + devecot + iptables

Steps to Reproduce:

Default installation without any vestacp customized configuration.

Yesterday that server had 100% inode usage and all user services stopped to work. I saw 3 millions of php session files created and not removed. So, because everything stopped to work, I removed some of them manually with:

find /home/*/tmp -type f -name 'sess_*' -ctime +5 -delete

Related Issues/Forum Threads:

I found same question here:

I observed session.gc_probability configuration is zero (default vestacp configuration), but I really think we can not use zero in this configuration.

; Defines the probability that the 'garbage collection' process is started
; on every session initialization. The probability is calculated by using
; gc_probability/gc_divisor. Where session.gc_probability is the numerator
; and gc_divisor is the denominator in the equation. Setting this value to 1
; when the session.gc_divisor value is 100 will give you approximately a 1% chance
; the gc will run on any give request.
; Default Value: 1
; Development Value: 1
; Production Value: 1

And I found that value is 1 on sources:

Other Notes:

I changed manually session.gc_probability to 1 and restarted nginx/apache and now I am seeing 1.4mi of php session files at /home/admin/tmp/ decreased to 129703. I think its too much either, but much better of course.

Copy link

beraldo commented Aug 24, 2017

I had the exact same issue. A LOT of sess_* files under many tmp directories

I'll switch session.gc_probability to 1 and hope it helps

Copy link

I have the same issue, is the session.gc_probablity to 1 the only option out there?

Copy link

I have the same issue, facing since last year. Tried many ways to delete the temp files, but that not letting me delete that files.

Copy link

Today I found that session creation stopped working and i found it was due to many session files into tmp directory. Due to inodes issues I used gc_probability=1 but it didn't resolved issue. You may use following code and add a cron based on your need

find /home/admin/tmp -mmin +30 -exec rm {} \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

5 participants