I didn’t say anything about your patch. I said ls probably won’t work if it’s a really huge number.
Ok applied on one server. I had to delete /var/lib/mysql/aria_log* to have MariaDB to restart.
Memory is not eaten anymore but I don’t see collectinfo.pl in the running process.
I’m waiting for the tmp folder to go on diet now (825896960 Mar 3 16:49 tmp)
You can manually trigger it from “Webmin ⇾ Webmin Configuration: Webmin Scheduled Functions” to get more details.
Thanks for pointing it to me.
I ran it but no joy;
drwxr-xr-x 2 domain domain 825896960 Mar 3 17:03 tmp
Anyway this is not a virtualmin issue now.
Thanks for the help !
So, you applied the patch, restarted Webmin, re-run collectinfo.pl and no session files were deleted?
By the way, the “Virtualmin Configuration → PHP options” page includes an option to control php_session_age.
First, try counting the files as Joe suggested earlier in ~/tmp. Then, change “Cleanup PHP session files after” option to 0.1 day, re-run collectinfo.pl, and count the files in ~/tmp again.
Well sorry, may be I was wrong.
When I do ls -l it still shows the same
drwxr-xr-x 2 domain domain 825896960 Mar 3 17:03 tmp
However now I can navigate and view the files in the tmp directory and there are not that much.
May be the size needs more time to refresh.
You can count the number of files in ~/tmp by running:
find ~/tmp -type f | wc -l
Oh yes sorry.
find tmp -type f | wc -l
1379
Cleaning appears to have worked, and the OOM issue has been resolved as well.
Yes on one server it’s good.
On another server I did the same but:
find tmp -type f | wc -l
9264814
It could be me…
Did you change “Cleanup PHP session files after” option?
I realize I didn’t set it on both.
Now it is, I had to kill a running collection.pl process and also the file deletion is taking time.
I need to be patient. ![]()
Thanks for all your help.
Will this patch added in the next version or I should apply it manually on other server ?
It is currently not in the most recent tagged version which is about to go out, but it might make it in.
I think you should figure out how/why you have 9 million sessions.
How many files are we talking about here? It would take hundreds of thousands for this to be an issue.
9 million and change.
Jesus, that’s a lot of files!
I have made another commit to make reading the dir more efficient : use readdir in a scalar context to avoid returning the whole director… · virtualmin/virtualmin-gpl@de76043 · GitHub
Ah, great! Thanks, @Jamie! This is also quite substantial!
Yes, I just created cherry-picked version of Virtualmin 7.30.6. @Jamie, please double check changes since 7.30.5 and make a new 7.30.6 release.