Skip Navigation

[Resolved] Constant server time-outs when editing an existing template

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 8 replies, has 3 voices.

Last updated by Waqar 1 year, 5 months ago.

Assisted by: Waqar.

Author
Posts
#2619737

Good Day Folks,

I have a template that performs very well on the front-end of my site. However, if I attempt to edit it, the performance on the back-end for editing makes it unusable. I constantly receive server time-outs or the page crashes. I've spoken with my host extensively about this and they believe I have more than adequate resources and an up-to-date with my PHP version. I have other templates that seem to work fine.

The specific message I'm receiving while waiting 30-90 seconds is:
Processing server request...

Might you have any suggestions on how I can resolve this?

I'd like to turn public access to the site off and have you login so you can see what I'm talking about. How can I forward login information confidentially.

Thank you much!
- Paige

#2619905

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Paige

Let me set a private reply so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.

It would be better if you have a staging server to test if available.

Which template has the problem?

Can we perform basic debugging steps such as de-activating/re-activating plugins, installing helper plugins while we check?

Note, I just tried to visit the site hidden link and it isn't working, and is displaying debug info publicly.

#2620655

Good Day Nigel,

I submitted both login information and just edited the message to add FTP info. Thank you, - Paige

#2620761

Hi Paige,

Thank you for sharing the access details.

1. I checked the template 'Template for Individual Canine Listings' and couldn't experience any delay while it loaded or even when I tried to add some temporary changes.

Are you experiencing this while using any particular device or browser? And can you please test if this happens only when you're logged in as a specific administrator user account?

2. The two post names that you mentioned in point 2, I couldn't find them in the 'Breeding Dams' and 'Breeding Sires' custom post types. Can you please check these post types again and ensure you are using the correct spellings in the autocomplete field of the dropdown list?

4. When I tested the pagination, I couldn't experience this issue in Firefox on my MacBook, but I did notice it on my mobile. Looks like the server or your cache plugin is using the cache version of the page on the mobile for optimization purposes.

I couldn't find any cache settings in the website's admin area. Is it possible that some optimization or cache policies are implemented at the server or the CDN level?

regards,
Waqar

#2621147
Temp 2.jpg
Temp.jpg

Hi Wagar,

Thank you for getting back to me.

1. I'll test the conditions for the delays to see if it is relative to a particular login or browser. Today, it's very evident when working with the Archive for Canine Listings. I'm using the pgrace admin login with Chrome on a Windows 11 laptop with 64 GB of memory and have also trialed it in Firefox.

2. I'm a bit puzzled by your response because those custom posts are right at the top of the related CPTs for Dams and Sires. I'll upload and circle them to make it clear. They should be seen on the drop-down list on the Canine Listing form.

3. Here are details about the CDN and Caching tools on the server. I think Toolset wouldn't recommend the disuse of CDN, so I'm wondering if you can suggest a practical workaround. For instance, should I have all posts appear on one page? Or any other suggestion that might easily resolve this.

NGINX DIRECT DELIVERY
With NGINX Direct Delivery, we will serve most of the static resources of your website (images, JS, CSS, and others) directly through NGINX to achieve the fastest possible loading time. It works for all kinds of applications without additional customization.

We highly recommend having NGINX Direct Delivery enabled at all times for the best results. However, if you need to use custom caching .htaccess rules for your static content you may need to switch it off.

DYNAMIC CACHE
The Dynamic Cache is a full-page caching mechanism for non-static resources. It prevents unnecessary database queries, processing of each page visit, and more. It highly improves your loading speed and the TTFB (time to the first byte) of your pages. For WordPress sites, the best dynamic cache results are achieved if you also install our SG Optimizer plugin.

For step-by-step instructions and more information, visit the SuperCacher tutorial. More detailed information about the Dynamic Cache can be found in this article.

MEMCACHED
Memcached is an object caching mechanism designed to improve the connection between your application and its database. It greatly improves the loading speed of dynamic content that can’t be served by Dynamic Caching (checkout pages, dashboards and backends, etc.). To use Memcached, you need to switch it on below and then configure your application.

Information for connecting to Memcached:
Memcached IP address: 127.0.0.1
Memcached Port: 11211

These can be turned off or put into Development Mode to temporarily suspends CDN’s caching features for all site visitors. Development mode is useful if you are making changes to cacheable content (like images, css, or JavaScript) and want to see those changes immediately.

Thank you very much,
- Paige

#2621171

Just an FYI: The server CDN and caching tools and complete purge can be controlled from SiteGround Optimizer from the WordPress left side menu toward the bottom, fourth item up.

#2621965

Thank you for sharing these details.

I've been running some tests on my website with a similar setup as your website, but couldn't reproduce these issues.

This suggests that something specific to your website/server is involved here. Do I have your permission to download a clone/snapshot of your website, to investigate this on a different server?

Note: I do see the 'Breeding Dams' and 'Breeding Sires' posts from your screenshots, in the posts lists. Earlier, I was looking for the short names that you used in your last message.

#2624319

Good Day Waqar,

No, it's not related to my site or server, per say. There is something that is limited the pick list to 10-options. Specifically, what I mean is that I have a main CPT called Canine Listings. I also have CPTs for Breeding Dam and Breeding Sire. When I create a new post for either of those two CPTs, the new posts are not being displayed on the pick list for the Canine Listing, Somewhere in Toolset, there is a setting that is telling the pick lists to only display 10-items. If you happen to know where I might find that setting, it would likely solve the issue.

Thank you,
- Paige

#2625661

Hi Paige,

Thank you for waiting, as I performed some more testing and research.

I'm afraid, currently there is not setting or option to control the list of items that are shown for the 'View with' field. We do have an internal ticket to improve how that list is generated.

Here is a workaround that you can use for now:

1. This is a code for a custom shortcode, that can programmatically set a specific post, as the preview post, for a particular content template.


add_shortcode( 'custom_shortcode_preview_test', 'custom_shortcode_preview_test_func');
function custom_shortcode_preview_test_func($atts)
{
    $a = shortcode_atts( array(
        'id' => '',
        'status' => '',
        'new' => ''
    ), $atts );
 
    if( $a['status'] == 'view' ) {
        $key_value = get_post_meta( $a['id'], 'tb_preview_post', true );
        // Check if the custom field has a value.
        if ( ! empty( $key_value ) ) {
            return $key_value;
        }
    }
 
    if( $a['status'] == 'update' ) {
        update_post_meta( $a['id'], 'tb_preview_post', $a['new'] );
    }
}

The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.

To update the preview post with the ID '5678' for a content template with ID '1234', this shortcode can be used as:


[custom_shortcode_preview_test id='1234' status='update' new='5678']

Note: You can create a temporary page, include this shortcode in the content and visit the front-end of the page and it will work.

Once the preview post as has been set, you can delete the temporary page.

I understand this isn't ideal, but, this is the best I could come up with, for the case when the target post is not showing in the 'View with' field of a template.

regards,
Waqar