• I just tried to get the plugin running and run into memory problems.

    After looking through the code I know why.
    To add data to the rest response the plugin goes through the whole wp_posts and wp_postmeta table and executes an join.

    In our installation that are 800,000 rows. For every single api request.

    Unfortunately this is not good at all.
    This can also not be turned off to just use the api key generation.

    All together the plugin does not offer hooks (actions / filters).

    This plugin seems to be premature.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here. I had to substantially increase PHP memory to run this – something feels very wrong.

    After a little digging I found the culprit: class/RestResponse.php:getMetafieldsWithPostTypes contains a query that returns an obscene amount of data that causes the large memory consumption and timeouts in my case. This is really sloppy coding and needs to be fixed by Integromat.

    Since I don’t need these fields in my apps, I simply disabled with:

    private static function getMetafieldsWithPostTypes()
            {
    
                    // BART
                    return [];
                    // END BART
    
                    global $wpdb;
                    $query = "
                            SELECT
                                    p.post_type,
                                    m.meta_key
                            FROM " . $wpdb->base_prefix . "postmeta m
                            INNER JOIN " . $wpdb->base_prefix . "posts p ON p.ID = m.post_id
                            ORDER BY
                                    post_type,
                                    meta_key
    • This reply was modified 3 years, 5 months ago by bartv42.
    Thread Starter ibes

    (@ib4s)

    We ended up using wp webhooks.

    There could at least be a hook to deaktivate the REST-API part …

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The plugin will crash bigger sites’ is closed to new replies.