Symfony logging in /var/lib/php/sessions every second

242 views
Skip to first unread message

Grant Forrest

unread,
Jul 17, 2020, 1:24:38 PM7/17/20
to AtoM Users
Hello, I am struggling with a problem on version 2.5
This was recently upgraded from 2.4 - I'm not sure if the issue was present on 2.4
A week or so after upgrading, the server ran out of iNodes and AtoM searches stopped working. I found that /var/lib/php/sessions had 1.7 million files. Unfortunately I couldn't get the dates as I had to delete them all using rsync to get my AtoM instance working again.
Immediately, the files began to accumulate again, one file every second (or so).
They are PHP session files, all have this format:

symfony/user/sfUser/lastRequest|i:1595004567;
symfony/user/sfUser/authenticated|b:0;
symfony/user/sfUser/credentials|a:0:{}
symfony/user/sfUser/attributes|a:1:{s:15:"sfHistoryPlugin";a:3:{s:10:"moduleName";s:17:"informationobject";s:10:"actionName";s:6:"browse";s:18:"currentInternalUri";s:24:"informationobject/browse";}}
symfony/user/sfUser/culture|s:2:"en";

I've messed around with my PHP session settings, no change.
I've tried to disable logging in factories.yml and settings.yml, no change

Help please!

Dan Gillean

unread,
Jul 20, 2020, 12:35:51 PM7/20/20
to ICA-AtoM Users
Hi Grant, 

I've not seen this reported before. Am I recalling correctly that you typically install on CentOS?

As such, there's a limited amount of support we can provide, as I suspect this may be a local configuration / deployment issue, rather than a bug in AtoM. Specifically, I would look into the default PHP session settings on your server. There are values that you could likely tweak that might help with garbage collection. I'm no expert in this area, but here are a few links that might point you in the right direction: 
Let us know what you discover! 

Regards, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/5a672353-7b64-4a8f-a146-7bb5e64050c5n%40googlegroups.com.

Grant Forrest

unread,
Jul 20, 2020, 6:14:20 PM7/20/20
to AtoM Users
Hi Dan, yes I do have an AtoM instance on CentOS but this one is Ubuntu 16.04 and PHP 7.2 (FPM)
I did tweak the PHP session variables in php.ini but your links reminded me that there are multiple php.ini files on this instance and I noticed that:
/etc/php/7.2/fpm/php.ini had:
session.gc_probability = 0
After setting this to
session.gc_probability = 1
it looked promising initially, but less so now.
Thanks for the pointers though. Hopefully I can establish why symfony is writing so many session files, regardless of the session settings.



Grant Forrest

unread,
Jul 22, 2020, 7:06:32 AM7/22/20
to AtoM Users
Dan, just to close on this one, it looks like the root of the problem was:
session.gc_probability = 0 
I am still curious as to why symfony is writing session files every 10 seconds or so, in the absence of any activity on the site (I checked using tcpdump) but that's a different question, so we can consider this one fixed.
Thanks for your help, as always.
Grant

Dan Gillean

unread,
Jul 22, 2020, 10:25:26 AM7/22/20
to ICA-AtoM Users
Thanks for posting back the solution you discovered, Grant! 

We'll try to keep an eye on this issue. I haven't seen it before, but we certainly don't want it to become a recurring issue! 

Glad to hear you're sorted for now. 

Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Reply all
Reply to author
Forward
0 new messages