• Resolved lfrm

    (@lfrm)


    I’m running WP 6.3 with PHP 8.1.29 and I’m getting this error when clicked on tab 2.2 Data, as shown here. I see multiple errors on my log as below…

    PHP Warning: preg_match(): Compilation failed: quantifier does not follow a repeatable item at offset 1 in …./public_html/wp-includes/class-wp.php on line 234

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter lfrm

    (@lfrm)

    So I went to increase my memory limit to 1GB because I have 1.4 mil custom posts. I can see tab “2.2 Data” now, but I can’t see my custom post from the list to index, as shown here.

    Thread Starter lfrm

    (@lfrm)

    I was waiting for your “2.2 Data” tab to load for like 15 mins and finally my PC browser told me I ran out of memory for the browser tab.

    Plugin Author WPSolr free

    (@wpsolr)

    2.2 Data tab?shows your post types and custom fields. To do so, WPSolr has to scan the wp_postmeta table, which takes a long time and memory resources on the server for 1.4 million post types.

    I ran out of memory for the browser tab

    This should not happen, unless you have many distinct custom field names in your wp_postmeta. Usually, you should “only” have tens of custom field names for millions of custom field values.

    Try to find out how many custom field names and how many custom fields you get in your database.

    Thread Starter lfrm

    (@lfrm)

    My wp_postmeta table has 19.4 mil rows. Roughly, each custom post has 12 rows in the postmeta table.

    For custom field names, I think we have like 15 but not all are used for each custom post.

    Plugin Author WPSolr free

    (@wpsolr)

    Can you try this SQL statements?

    SELECT  distinct meta_key
    FROM posts as POSTS INNER JOIN postmeta as POSTMETAS
    ON POSTS.ID = POSTMETAS.post_id
    WHERE POSTS.post_type = 'your_custom_post_here'
    Thread Starter lfrm

    (@lfrm)

    The SQL statement returned a total of 1139192?rows. Took about 1 min to execute the query on PHPMyAdmin

    Plugin Author WPSolr free

    (@wpsolr)

    If true, this means you have 1 million+ custom field names in your system (not values, names). Screen 2.2 tries to display those 1M+ names, which is impossible.

    Thread Starter lfrm

    (@lfrm)

    Thanks for the insights. Ok, I found out why. A plugin I’m using is generating MD5 hash as meta key. Is there a way for us to not select any meta_key in your plugin? I was actually hoping for the UI to appear that lets me select “None.”

    Or I may need to edit your plugin code to not include a meta_key that is like ‘e675753cead50bb121c112456e6a8957’

    Plugin Author WPSolr free

    (@wpsolr)

    You can edit wpsolr-free/wpsolr/core/classes/models/post/class-wpsolr-model-meta-type-post.php, function get_fields() {...}

    Or comment the use of this function in file wpsolr-free/wpsolr/core/dashboard/dashboard_settings.inc.php:
    $model_type_fields = $model_type_object->get_fields();

    Your modifications will be lost in next update, but it should be enough as a workaround.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.