-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[Bug]: thousands of php sessions in /var/lib/php/sessions #35430
Comments
Do you have both |
Yes |
Likely a duplicate of #7628 |
Uhm, yes you could be right. I'll have to check all my users whether they are using webdav or API calls but I don't think so. |
I think this has to do with the Apps "Nextcloud Office" and "Collabora Online - Built-in CODE Server". |
#7628 has ben resolved |
Uhm, are you still sure that this is a duplicate of #7628 ? |
I'm afraid noone is reading my last comment, since the issue is already closed. Do I really have to open a new issue? |
If you see the issue with Nextcloud 26 yes. |
This does not really make sense. |
You should be able to match many, if not most, of these sessions up with the transactions in (either) your web server or nextcloud logs by just matching up the timestamps. Some may inadvertently match up, but if you do it across a large enough window (from the looks of it 5-10 minutes should be sufficient) a clear pattern should emerge. Unfortunately the logs you provided were only a narrow slice, but the only one that does match up in what you provided is:
with:
That doesn't mean Office/CODE is the culprit - only that it's one of the things accessing your server regularly (you'll note there are 8 other similar transactions during the same narrow time window without corresponding session files). Do you by chance have |
@raid1 What is the oldest |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Thanks for taking care of this issue. |
Bug description
There are thousands of php sessions in /var/lib/php/sessions and NC constantly creates more.
Yesterday I deleted 2,5 million sess_* files there!
(session.gc_maxlifetime = 172800)
We noticed it because the NC didn't allow new logins (the inode table was full).
I was running 24.0.7 but then yesterday I upgraded to 25.0.1
But the problem persists. I'm getting at least one new session per minute:
The session data file contains encrypted data such that I cannot check from which user it's coming from.
The NC log does not show any related lines.
I "impersonated" all users and checked their profile for too many sessions but nothing suspicious there either.
I checked the apache logs for connections from many IPs but am unable to deduct a problem from there (except that it's many lines)
See:
(I removed the first column with IPs and changed the username.)
Running out of ideas now...
Is this a NC bug or a misconfiguration from one of my users?
How can I differentiate between these two possibilities since the NC log doesn't help?
Thanks,
Andy
Steps to reproduce
Expected behavior
/var/lib/php/sessions should not contain more than a few hundred files.
Depending on the amount of NC users and devices.
Installation method
Community Web installer on a VPS or web space
Operating system
Debian/Ubuntu
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: