[Elgg 2.3 & 3.3 & 4.X: Bulk User Admin] v3.3.0

Release Notes

  • Updated for Elgg 3.3,
  • Minimal required version Elgg 3.3.0.
  • Forget these links about trying to tell you how to delete database entries this way. That's not solving your problem. Your problem with the size of the database is not (maybe never has been) the number of users. Though it might help to clean up unwanted users (and the Bulk User Admin plugin does exactly that! You only need the 1 minute cronjob of Elgg to work - and it seems at least this one works on your site).

    As for the users: if the "Content Statistics" page shows you the expected number of users (i.e. the number of users you expect AFTER the user deletion) the user entities and their content has been deleted from the database and the server. The number of users would only be reduced if the Bulk User Admin plugin has deleted the accounts for real.

    But your problem is caused be two other problems:

    • the log table (over 28 million rows)
    • the sessions table (over 19 million rows)

    The entities table only has about 160 thousands entries. So even after removal of some 1000 users you won't see much of a difference.

    The reason the log and sessions table got so big on your site is due to two different reasons.

    The log table never got cleaned up because you had never set up the necessary cronjob (corresonding the the System Log plugin settings - as named on Elgg 3 while it was named Logrotate plugin on Elgg 2).

    How to fix the log table problem:

    1. Deactivate the System Log plugin. This plugin and the log entries it creates is quite useless anyway!!! And if you never made any use of the log entries you won't need them in the future either. Deactivating the System Log plugin results in no new entries being created in the future.
    2. Within phpMyAdmin "EMPTY" the "ToEvolutionsystem_log" table. Please DO NOT delete the table but only "EMPTY" the table. The table must remain even if it will have 0 rows. Otherwise, Elgg won't work. But with the System Log plugin deactivated, no new entries will be added either.

    How to fix the sessions table problem:

    with a correct php installation the table wouldn't have gotten that large in the first place. Unfortunately, Elgg relies on some php variables having some specific values (but this is not the case by default on some servers) to clean up the table from outdated entries. These php variables are (together with some example values)

    session.gc_probability = 1
    session.gc_divisor = 1000
    session.gc_maxlifetime = 1440

    These variables must not be commented out or there will never be a cleanup of the sessions table taking place. You can set larger values for session.gc_maxlifetime (the number gives the number of seconds a session of a user is valid without some user action but don't set it too large).

    You will have to set these variables in the php.ini of your server. If that's not possible it might work to set them in the php block within the .htaccess file of your Elgg installation.

    See also some other discussions about the sessions table issue: https://elgg.org/discussion/view/2776966/elgg-user-sessions-table-corrupted, https://elgg.org/discussion/view/2873619/large-size-of-table-in-the-mysql-database and https://elgg.org/discussion/view/2470703/can-i-empty-elgg-users-sessions-table-too-big.

    The fix the imminent problem with the current large size of the sessions table of your installation you probably have to "EMPTY" (again: NOT delete) the "ToEvolutionusers_sessions" table with phpMyAdmin. Best do it while not logged in on your site. When you empty the table all users will get logged out and will have to log in again.

    Further things you should do (best would be to get it working AFTER you fixed the issue with the log and sessions table):

    • get the Weekly and Monthly cronjobs working on your site.  According to the screenshot you posted the "Monthly" cronjobs Never run before and the last run of the "Weekly" was 17 days ago - so definitely not weekly either.
    • Make sure you have the bundled Garbagecollector plugin activated and set the cron interval in the Garbagecollector plugin settings to be used to "Once a week". On the next weekly cronjob run the tables of you installations there should be some cleanup of orphanded entries happening. But only if the weekly cronjob is really working.

    Anyway, your problems are not due to the Bulk User Admin plugin. So, I want to ask you to not post here in this page anymore in future if you have unrelated problems.


  • Category: User admin
  • License: GNU General Public License (GPL) version 2
  • Updated: 2023-9-17
  • Downloads: 580
  • Recommendations: 1

Other Projects

View iionly's plugins