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 - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
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 - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Upgrade to Ubuntu 16.04 from 14.04 HogensHero 8 30 ,370 07-18-2020, 03:13 AM
Last Post: dycott78
Ubuntu: How to Enable tls/ssl in proftpd Diablo925 2 12 ,850 04-21-2020, 03:35 AM
Last Post: iraqiboy90
Ubuntu 18.04 or 20.04 Kangarooo 1 6 ,955 03-20-2020, 11:39 AM
Last Post: Jettaman

Forum Jump:


Users browsing this thread: 1 Guest(s)