Support » Plugin: Participants Database » [Plugin: Participants Database] Some issues with PDB 1.3.7

  • Resolved jacksun


    Hi, great plugin, it is doing everything I need it to do. I am however running into one or two issues that are hopefully solved quickly and easily.
    Firstly, I have 102,882 records in my PDB install. This will continue to grow, and I expect will hit 200 – 250,000 over the next year or so. Now, on to the issues.

    1) I have to set my PHP memory limit in my php.ini to = 768M or I get a nasty “Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 96 bytes) in….” error. The my.cnf file is optimized as is .htaccess. I am using RLimitMEM/CPU/NPROC set to MAX in .htaccess as well. No changes resolved the issue except bumping my php.ini item to this horribly high level.
    I am using this short code on the page I have this issue with:
    [pdb_list fields=”last_name, first_name, soldier_number, regt_unit” search=”true” orderby=”last_name” order=”asc” list_limit=10″].
    List limit is also set in the admin interface to 10.
    This page is the initial list of 10 items shown to users when they first get on the record search page.

    2) When the initial list displays from above, the page list at the bottom that allows you to go to the next page, or page 5 or whatever has a scrollbar next to it. It only scrolls up and down about the width of a line of text, but the scroll bar is annoying. For the life of me I cannot find where to place a couple of P tags to open up this gap to rid myself of this annoyance.
    This is immediately below the table shown when you go to the initial page.

    3) The “List Participants” link under admin works, but I only get a blank page so if I want to edit a record I must do it manually inside the DB. This was working during initial testing without a problem.

    Any assistance would be greatly appreciated.


Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author xnau webdesign



    Regarding your first question, I have to admit this is beyond my knowledge. I am using standard WP methods for accessing the database, so there shouldn’t be any additional memory requirements because of the size of the database. Perhaps if I knew exactly where in the script you’re encountering the error, I could look at it more closely.

    Point 2–I’d have to look at the page to give you a definitive answer, but there is a DIV tag with class “pagination” that is probably what you need to target to rid yourself of the scroller. I would say something in your theme CSS is affecting this element or something inside it, so you’ll be looking for a rule in your theme stylesheet to override.

    3) this is a weakness of my implementation: the first record in the database with an ID of 1325 is the default record, which must be present for the “edit record” page to work. If you put this record back in to your database the admin page will work again.

    Hi, the errors were in wp_db.php,

    Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 72 bytes) in /home/xxxxxxxx/public_html/wp-includes/wp-db.php on line 1383.

    I’ll look for the div tag and see what is going on.

    I have that record in place. I checked it yesterday after going through previous support issues on this site and yours. Still no luck with it showing.


    Can records 0-1324 exist? Or does record 1325 have to be the first record?


    Hi, so I rebuilt my entire installation. Deactivated the plugin, deleted it and all data. Made sure the uploads folder was empty and deleted it as well. Cleaned the database out of all PDB data. Reinstalled.

    Everything worked fine until about the time I had 40000 records in the DB and then the list participants page failed. It failed with another error about Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 72 bytes).
    So increasing the php.ini memory size has not corrected this issue, but the issue is related to the fact the list participants page wants to have a list of all items in the database available to it.
    Basically I think it does the same query as the initial display page, without the benefit of restricting the data it grabs using a shortcode.

    So is there a way to restrict the data this query grabs? On the list participants page I would normally search for the record I want to see or edit, I wouldn’t page through the data. Because of that I think it should just grab the first 10 records (as adjusted in settings) to display, anything else I can search for.
    How do I go about altering this query for the page?


    Plugin Author xnau webdesign



    This is some good feedback here. I did not test the plugin as thoroughly as I probably should have, and I didn’t test large databases.

    So, I looked at the code to see where I may causing a problem for you with the database query. Now, the main query is paginated, so at that point, it’s only getting enough record to fill a page. That can be configured in the settings.

    But just before that, I use the same query to count the records. Clearly I need to do something more efficient there–and I think this may be the hangup.

    Try this: replace line 171 of classes/PDb_List.class.php with:

    $count = $wpdb->get_results( str_replace( 'SELECT * FROM', 'SELECT COUNT(*) FROM', self::$list_query ), ARRAY_A );
    self::$num_records = current( $count[0] );

    That should set the total count without loading the entire record set. Let me know how this works for you, I’m incorporating this into the next release.

    Worked like a charm. I can pull 250 records into the list participants admin interface without an issue. I use the shortcode to limit web facing searches and pages. The speed is much quicker overall, even front end website stuff. And I mean quicker.


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Participants Database] Some issues with PDB 1.3.7’ is closed to new replies.