This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Ubuntu 14.04 sessions not clearing fix
#1
Ubuntu 14.04 sessions not clearing fix
Ubuntu 14.04 sessions not clearing fix:


OPEN:
Code:
/etc/cron.d/php5
FIND:
Code:
09,39 *     * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/lib/php5 ] && /usr/lib/php5/sessionclean /var/lib/php5 $(/usr/lib/php5/maxlifetime)
REPLACE WITH:
Code:
09,39 * * * *     root   [ -x /usr/lib/php5/maxlifetime ] && [ -x /usr/lib/php5/sessionclean ] && [ -d /var/sentora/sessions ] && /usr/lib/php5/sessionclean /var/sentora/sessions $(/usr/lib/php5/maxlifetime)
RESTART CRON SERVICE:
Code:
service cron restart
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by: Me.B , apinto
#2
RE: Ubuntu 14.04 sessions not clearing fix
Tested and working.
My Sentora Resources
[Module] Mail Quota Count | Vagrant Box with Sentora

[Image: vanguardly-logo-micro.png]
Graphic and Web Design. Development.
www.vanguardly.com


Reply
Thanks given by:
#3
RE: Ubuntu 14.04 sessions not clearing fix
Hi!

I have problem with inodes 100% full and I have tested this solution but unfortunately it is not working to me.

The result for:


PHP Code:
find / -xdev -printf '%h\n' sort uniq -sort -k 1 -


Is:


PHP Code:
1161328 /var/sentora/sessions 

The result for: 


PHP Code:
df -


Is:


PHP Code:
Filesystem                 Inodes   IUsed IFree IUseMounted on
udev                        62581     402 62179    1
% /dev
tmpfs                       63403     347 63056    1
% /run
/dev/disk/by-label/DOROOT 1310720 1298642 12078  100% /
none                        63403       1 63402    1% /sys/fs/cgroup
none                        63403       4 63399    1
% /run/lock
none                        63403       1 63402    1
% /run/shm
none                        63403       1 63402    1
% /run/user 


Can you give me other suggestion to solve this problem with sessions?

Edit:

Trying delete the files manually the result is:

PHP Code:
-bashforkCannot allocate memory 

Maybe it's reason to cron not working, so many files to delete.

Best regards.
Reply
Thanks given by:
#4
RE: Ubuntu 14.04 sessions not clearing fix
For now my solution was:


PHP Code:
rm -/var/sentora/sessions
mkdir 
-/var/sentora/sessions
sudo chown 
-R www-data:www-data /var/sentora/sessions
chmod 777 
/var/sentora/sessions 


Waiting to see if cron will work.

The cron is working now.
Thanks for this fix.
Reply
Thanks given by:
#5
RE: Ubuntu 14.04 sessions not clearing fix
glad you got it sorted out Smile
-TGates - Head of Support

SEARCH the Forums or read the DOCUMENTATION before posting!
Modules Maintained: 13 - Module Installs: 108k+

Find my support or modules helpful? Donate HERE
Get your domains using my affiliate link:
GoDaddy - Domains
Reply
Thanks given by:


Possibly Related Threads...
Thread Author Replies Views Last Post
Ubuntu: How to setup TLS on postfix and dovecot Diablo925 24 32,274 10-09-2017, 04:18 AM
Last Post: zanga
Backup to Dropbox in Ubuntu pinguy 16 4,933 04-06-2017, 12:50 AM
Last Post: FernandoGarcia
Upgrade to Ubuntu 16.04 from 14.04 HogensHero 6 1,992 01-21-2017, 05:47 AM
Last Post: HogensHero

Forum Jump:


Users browsing this thread: 1 Guest(s)