Send private message

You must be logged in to send a private message.

Friends

No friends yet.

Group membership

Activity

  • seri_ng commented on the plugin [Elgg 1.8-1.12 & 2.X: Poll plugin]
    Just a friendly question on Poll upgrade to Elgg3. Have you already started the upgraded? If not, I might be able to assist you with the upgrade and submit a pull request. Please advise.
  • seri_ng commented on the plugin Poll
    Thank you Jerome for your response!
  • seri_ng commented on the plugin Poll
    I am currently use Poll version 2.3.4 on Elgg 2.3.7 and would like to upgrade the Poll plugin to version 3.2.1. I tested on my test environment and love the new looks of the Poll plugin. But I noticed that existing polls (created by Poll version...
  • seri_ng replied on the discussion topic Delete Annotations Records Using MySQL Command
    With your approach, the CPU usage is mostly below 50% for MySQL service. Awesome!! Thanks again Jerome! view reply
  • seri_ng replied on the discussion topic Delete Annotations Records Using MySQL Command
    Thanks Jerome! I will try your recommendation and let you know how it goes. view reply
  • seri_ng replied on the discussion topic Delete Annotations Records Using MySQL Command
    Thanks Jerome! I tried ElggBatch without the 'batch_inc_offset' and the deletion process is still consuming 200+% CPU usage.  I will try to set the batch_inc_offset to false as you suggested. I delete entities of this subtype... view reply
  • seri_ng replied on the discussion topic Delete Annotations Records Using MySQL Command
    Thanks RvR for a quick response! I will try to use ElggBatch as suggested. view reply
  • seri_ng added a new discussion topic Delete Annotations Records Using MySQL Command in the group Beginning Developers
    Summary of my website: Elgg Version: 3.3.8, MySQL Version: 8, PHP Version: 7. I wanted to delete an entire subtype from my database. But entities for that subtype have millions of annotations associated with them. I currently use below approach...
    • Changing to ElggBatch will not make the process consume less CPU it'll go as fast as it can thus using all CPU.

      If you want it to slow down build in a sleep(). Bu then it'll take longer.

      Also with ElggBatch make sure 'limit' is set to false.

      Also if your calling your cron job with curl you'll get the overhead of the webserver. Just make a script which does this part

      // start Elgg (in pseudo code)
      - Load the Composer autoloader
      - start the Elgg Application
      
      // start removing your entities
      $options = [
          'type' => 'object', 
          'subtype' => 'subtype_needed_to_be_deleted', 
          'limit' => false,
          'batch' => true,
          'batch_inc_offset' => false,
      ];
      
      $entities = elgg_get_entities($options);
      
      foreach ($entities as $entity) {
         echo "Removing GUID: {$entity->guid}" . PHP_EOL;
         ...deletion process---
      }

      The foreach loop will go on until all entities have been removed

    • Thanks Jerome! I will try your recommendation and let you know how it goes.

    • With your approach, the CPU usage is mostly below 50% for MySQL service. Awesome!!

      Thanks again Jerome!