Bizzare slowness upon saving changes

  • Hi guys,

    We have recently experienced a continuous problem with saving changes at custom master pages' regions. After editing and saving it can take up to 60 sec for the CMS to display the "Content successfully updated" message despite changes are visible before that happens in a separate tab. What's also strange that other admin pages like Blog or Navigation work with no issues at all. Any ideas on how to debug it?

    Thanks for any insights

    Perch Runway: 3.1.5, PHP: 7.3.17, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $, with PDO

    Server OS: Linux, cgi-fcgi

    Installed apps: content (3.1.5), assets (3.1.5), categories (3.1.5), perch_blog (5.6.1), perch_forms (1.12), perch_comments (1.2.1), perch_mailchimp (3.1)

    App runtimes: <?php $apps_list = [ 'content', 'categories', 'perch_forms', 'perch_blog', 'perch_comments', 'perch_mailchimp'];


    Image manipulation: GD

    PHP limits: Max upload 64M, Max POST 64M, Memory: -9.5367431640625E-7M, Total max file upload: -9.5367431640625E-7M

    F1: 3b606135b33e6a102526838f4152a807

    Resource folder writeable: Yes

    REQUEST_URI: /cms/core/settings/diagnostics/

    SCRIPT_NAME: /cms/core/settings/diagnostics/index.php

  • Hi there,

    I have not a way to check the development right now. But this does happen on production. We have a strong feel that this hasn't been happening before otherwise w'd noticed.

    Thanks a lot!

  • Your perch3_content_index table looks a little large so I suspect it is taking Perch longer to update the indexes and revisions when you save a region.

    My advice is to first test in a development environment to rule out a recently introduced server change as the cause. If you do get the same result, then you can look at reducing the size of your content index table.

    (1) Reduce the number of revisions kept in the database

    Add the following to your Perch config.

    1. // Number of revisions for Collection and Regions
    2. define('PERCH_UNDO_BUFFER', 2);

    (2) Tell Perch to not index all fields

    Add the no-index attribute to fields you don't need for filtering or sorting. For some regions that can be all fields.

    1. <!--* do not index images *-->
    2. <perch:content id="image" type="image" label="Image" no-index>
    3. <!--* index slugs *-->
    4. <perch:content id="slug" type="slug" for="Title">

    Note for this to take effect, you need to republish the pages a few times (Pages > Republish button on the right). It would probably be wise to test this on a development/staging environment first.