Edit Users in Virtual Server does not load, browser tab just spins and spins

Just created a new VPS at Linode, by copying an another Linode backup I have (I do this often). So the new server is a replica of another one. I then change hostname and Ip address. Always works fine.

I then ran all the updates, so its Webmin 4.02 GPL

I then imported a large Cpanel backup (7Gb in size)

I cannot load the Users page for this server. It just spins and spins. The heading is there “Mail and FTP Users”. Edit Mail Aliases loads OK as do other modules I loaded like databases.

There are only a few users on this account. Going through Webmin to view Users works OK, I can see Users and Groups, but not when using Edit Users in Virtualmin.

P.S. I dont know i its related but when I migrated this Cpanel backup the page just staid on “validating backup” or whatever it was. This just stayed for hours. I eventually loaded Webmin in a new window and could see the server was created OK, so the migrate page just got stuck.

I suppose something went wrong during the CPanel import that causes Webmin to get stuck at a certain step that’s required for listing the users. No idea off the bat what that could be, Eric or Jamie would have to chime in here.

What you could do: Turn on Webmin’s debug logging, and check the log file at which step/command/procedure webmin seems to freeze. Or, install “atop” and see if some process is using overly many resources when you try to load the users page.

top -c shows this, but I have not accessed the page for a couple of hours:

12106 root 20 0 134m 73m 312 D 0.3 7.3 0:15.86 /usr/libexec/webmin/virtual-server/list_users.cgi
12550 root 20 0 134m 94m 312 R 0.3 9.4 0:15.21 /usr/libexec/webmin/virtual-server/list_users.cgi
12552 root 20 0 134m 94m 312 D 0.3 9.4 0:15.03 /usr/libexec/webmin/virtual-server/list_users.cgi
12553 root 20 0 134m 91m 312 D 0.3 9.2 0:15.02 /usr/libexec/webmin/virtual-server/list_users.cgi
12881 root 20 0 134m 96m 312 D 0.3 9.7 0:14.37 /usr/libexec/webmin/virtual-server/list_users.cgi
12959 root 20 0 134m 100m 312 D 0.3 10.0 0:16.32 /usr/libexec/webmin/virtual-server/list_users.cgi
19762 root 20 0 132m 122m 1852 R 0.3 12.2 0:06.28 /usr/libexec/webmin/virtual-server/list_users.cgi

Is the loggin enabled in Webmin Confifuration -> Debugging Log File? Enabled that but could not see anything related to the user module.

Yeah it seems that the list_users.cgi hangs. I’m sorry, but I won’t be able to debug this, someone from the Virtualmin team with experience concerning the code will need to help you out here.

I did some chatting with Jamie about this – his first thought was to try going into System Settings -> Virtualmin Configuration -> User interface settings, and in there, set “Show mailbox size in users list” to “No”.

After doing that, are you able to access the Edit Users page?


Haha! Instantly loaded when I disabled mailbox size.

All users Usermin EXCEPT the main account name loads OK.

Added the account in Thunderbird its just spinning.
trying to list all files or a run du on the Maildir/cur folder doesn’t run, just hangs. I mean maybe it will take hours, but I haven’t left it for that long

Sooo, do you think there are just THOUSDANDS of emails in there maybe?? Cant even get the folder size or list files in the command line.

Managed to find out how many emails in there… 599,400!!!

This is a site we just took over from someone else. Their old Cpanel account had the main account name as the catchall and all the cron jobs (2 every minute) were emailing to that account, and no one knew. Mad.

So hopefully once I delete all these, if I can (I think Linux shows an error with rm when there are too many files), then it may be fixed.

Moved the cur and new folders out of Maildir, so new empty ones created, now Users list in Vm works fine

Then I can do a rm -rf cur on the folder rather than all files.

So all OK now I think.

Before you delete the cur dir, it’d be interesting to know what was in there to cause list_users to freeze (or maybe take a very long time to complete). Too many emails maybe?

Yes 599,400 emails in there. they were just cron notification emails.

Okay, there you go. I suppose the list-users script was not prepared to handle such an enormous number of email files. :slight_smile:

Yeah thats right. I think its quite a limitation in linux that it takes so long to, or just cant, list so many files. It should at least limit them if it cant list over a certain amount. Or have some sort of similar limit like in databases where you can limit x number of rows (like in PhpMyAdmin). Imagine PhpMyAdmin crashing just because there are thousands of rows in a database and you cant even view or return the first 30 in some sort of pagination.

Roundcube, Horde and Squirrelmail were the same as Usermin. None of them could load the first 20 emails even, they all hung. So obvioysly due to the lmitation in Linux list files operation.

Yeah that’s right, just listing those files in the filesystem can take a very long time, let alone opening them to see what’s inside. :slight_smile:

It should be slightly faster though to just sum up their sizes, so maybe the list-users script does something else with the files that takes way longer than just listing the directory to get the file sizes.