pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Excessive load time due to php error slow logs from pods plugin #7046

Open lauriebeingdesign opened 1 year ago

lauriebeingdesign commented 1 year ago

Description

The load time for pages is close to 15 seconds per page. We have tried everything to lower the load time including adding the pods caching plugin. Our GT Metrics score has gone from 82-96% but we have not seen any notice in speed. Our server said "When loading various pages uncached, I streamed the PHP error logs on my end and I was able to see a slow log entry being generated each time. Checking the call stack of this log entry, it seems that the pods plugin may be doing some backend processing which is causing this major slowdown. To test this fully, I created a cloned sandbox environment, and when deactivating the pods plugin, the uncached page loads went from 15s on average, all the way down to 3-5s on average."

This is one of many sites where we have this issue. The pods caching plug has helped somewhat on other sites, but not this one. We have noticed a significant slow down in the site in the past two weeks. I may be from the newest update.

website: https://heartofthehealer.com

Slow log from our server: script_filename = /www/index.php [0x00007feca5413a10] pods_no_conflict_on() /www/wp-content/plugins/pods/classes/PodsMeta.php:3727 [0x00007feca54137d0] get_meta() /www/wp-content/plugins/pods/classes/PodsMeta.php:2947 [0x00007feca54136e0] get_post_meta() /wordpress/wp-includes/class-wp-hook.php:310 [0x00007feca5413600] apply_filters() /wordpress/wp-includes/plugin.php:205 [0x00007feca54134e0] apply_filters() /wordpress/wp-includes/meta.php:632 [0x00007feca5413400] get_metadata_raw() /wordpress/wp-includes/meta.php:571 [0x00007feca5413350] get_metadata() /wordpress/wp-includes/post.php:2490 [0x00007feca54132c0] get_post_meta() /www/wp-content/plugins/astra-addon/addons/nav-menu/classes/class-astra-ext-nav-menu-loader.php:520 [0x00007feca5413040] get_megamenu_default() /www/wp-content/plugins/astra-addon/addons/nav-menu/classes/class-astra-ext-nav-menu-markup.php:189 [0x00007feca5412fc0] add_custom_fields_meta() /wordpress/wp-includes/class-wp-hook.php:308 [0x00007feca5412ee0] apply_filters() /wordpress/wp-includes/plugin.php:205 [0x00007feca5412e00] apply_filters() /wordpress/wp-includes/nav-menu.php:994 [0x00007feca5412d10] wp_setup_nav_menu_item() /wordpress/wp-includes/nav-menu.php:722 [0x00007feca5412ca0] array_map() /wordpress/wp-includes/nav-menu.php:722 [0x00007feca5412ba0] wp_get_nav_menu_items() /www/wp-content/plugins/astra-addon/addons/nav-menu/classes/class-astra-ext-nav-menu-loader.php:86 [0x00007feca5412aa0] load_scripts() /wordpress/wp-includes/class-wp-hook.php:308 [0x00007feca54129c0] apply_filters() /wordpress/wp-includes/class-wp-hook.php:332 [0x00007feca5412950] do_action() /wordpress/wp-includes/plugin.php:517 [0x00007feca5412870] do_action() /wordpress/wp-includes/script-loader.php:2180 [0x00007feca5412810] wp_enqueue_scripts() /wordpress/wp-includes/class-wp-hook.php:308

Version

2.9.13

Testing Instructions

1) Go to https://heartofthehealer.org/. 2) Notice the load time

Screenshots / Screencast

No response

Possible Workaround

I don't have a work around. If you find one, I'd be happy to know what you come up with!

Site Health Information

`
### wp-core ###

version: 6.1.1
site_language: en_US
user_language: en_US
timezone: America/New_York
permalink: /%postname%/
https_status: true
multisite: false
user_registration: 0
blog_public: 1
default_comment_status: undefined
environment_type: production
user_count: 25
dotorg_communication: true

### wp-paths-sizes ###

wordpress_path: /wordpress
wordpress_size: 43.64 MB (45761094 bytes)
uploads_path: /www/wp-content/uploads
uploads_size: 504.37 MB (528873082 bytes)
themes_path: /www/wp-content/themes
themes_size: 21.67 MB (22719493 bytes)
plugins_path: /www/wp-content/plugins
plugins_size: 206.28 MB (216301151 bytes)
database_size: 84.89 MB (89014272 bytes)
total_size: 860.85 MB (902669092 bytes)

### wp-dropins (1) ###

db-error.php: true

### wp-active-theme ###

name: Astra (astra)
version: 4.1.1 (latest version: 4.1.2)
author: Brainstorm Force
author_website: https://wpastra.com/about/?utm_source=theme_preview&utm_medium=author_link&utm_campaign=astra_theme
parent_theme: none
theme_features: core-block-patterns, astra_hooks, widgets-block-editor, align-wide, automatic-feed-links, title-tag, post-thumbnails, starter-content, html5, post-formats, custom-logo, customize-selective-refresh-widgets, editor-style, woocommerce, rank-math-breadcrumbs, amp, widgets, menus
theme_path: /www/wp-content/themes/astra
auto_update: Enabled

### wp-themes-inactive (1) ###

Twenty Twenty-Three: version: 1.0, author: the WordPress team, Auto-updates disabled

### wp-plugins-active (32) ###

Astra Pro: version: 4.1.1, author: Brainstorm Force (latest version: 4.1.2), Auto-updates disabled
Authors List: version: 2.0.1, author: WPKube, Auto-updates disabled
Classic Editor: version: 1.6.2, author: WordPress Contributors (latest version: 1.6.3), Auto-updates disabled
Elementor: version: 3.11.5, author: Elementor.com (latest version: 3.12.0), Auto-updates disabled
Elementor Pro: version: 3.11.7, author: Elementor.com (latest version: 3.12.0), Auto-updates disabled
Elementor Shortcode Builder for MEC: version: 1.6.0, author: Webnus, Auto-updates disabled
Elementor Shortcode Designer: version: 1.2.1, author: Webnus, Auto-updates disabled
Elementor Single Builder for MEC: version: 1.6.5, author: Webnus, Auto-updates disabled
Email Address Encoder: version: 1.0.22, author: Till Krüss, Auto-updates disabled
Enable Media Replace: version: 4.0.3, author: ShortPixel (latest version: 4.1.0), Auto-updates disabled
Heartbeat Control by WP Rocket: version: 2.0, author: WP Rocket, Auto-updates disabled
Intuitive Custom Post Order: version: 3.1.4.1, author: hijiri, Auto-updates disabled
Managed Plugin Updates: version: 5.13.28, author: Flywheel, Auto-updates disabled
Modern Events Calendar: version: 6.1.0, author: Webnus, Auto-updates disabled
Participants Database: version: 2.4.7, author: Roland Barker, xnau webdesign, Auto-updates disabled
Participants Database reCAPTCHA: version: 1.6.1, author: Roland Barker, xnau webdesign, Auto-updates disabled
Pods - Custom Content Types and Fields: version: 2.9.13, author: Pods Framework Team, Auto-updates disabled
Pods Alternative Cache: version: 2.1.7, author: Pods Framework Team, Auto-updates disabled
Redirection: version: 5.3.9, author: John Godley, Auto-updates disabled
Say What?: version: 2.1.4, author: Ademti Software, Auto-updates disabled
Shortcode Cleaner: version: 1.1.6, author: Jozoor, Auto-updates disabled
Simple Divi Shortcode: version: 1.0, author: Fabrice ESQUIROL - Creaweb2b, Auto-updates disabled
Simple Local Avatars: version: 2.7.4, author: 10up, Auto-updates disabled
The SEO Framework: version: 4.2.8, author: The SEO Framework Team, Auto-updates disabled
Ultimate Addons for Elementor: version: 1.36.14, author: Brainstorm Force, Auto-updates disabled
White Label CMS: version: 2.5, author: www.videousermanuals.com, Auto-updates disabled
WP-Optimize - Clean, Compress, Cache: version: 3.2.13, author: David Anderson, Ruhani Rabin, Team Updraft, Auto-updates disabled
WPCode Lite: version: 2.0.8.1, author: WPCode (latest version: 2.0.9), Auto-updates disabled
WP Grid Builder: version: 1.7.4, author: Loïc Blascos, Auto-updates disabled
WP Grid Builder - Elementor: version: 1.2.2, author: Loïc Blascos, Auto-updates disabled
WPS Hide Login: version: 1.9.8, author: WPServeur, NicolasKulka, wpformation, Auto-updates disabled
Yoast Duplicate Post: version: 4.5, author: Enrico Battocchi & Team Yoast, Auto-updates disabled

### wp-media ###

image_editor: WP_Image_Editor_Imagick
imagick_module_version: 1690
imagemagick_version: ImageMagick 6.9.10-23 Q16 x86_64 20190101 https://imagemagick.org
imagick_version: 3.4.4
file_uploads: File uploads is turned off
post_max_size: 300M
upload_max_filesize: 300M
max_effective_size: 300 MB
max_file_uploads: 20
imagick_limits: 
    imagick::RESOURCETYPE_AREA: 85 GB
    imagick::RESOURCETYPE_DISK: 1.844674407371E+19
    imagick::RESOURCETYPE_FILE: 786432
    imagick::RESOURCETYPE_MAP: 85 GB
    imagick::RESOURCETYPE_MEMORY: 43 GB
    imagick::RESOURCETYPE_THREAD: 1
imagemagick_file_formats: 3FR, 3G2, 3GP, AAI, AI, ART, ARW, AVI, AVS, BGR, BGRA, BGRO, BIE, BMP, BMP2, BMP3, BRF, CAL, CALS, CANVAS, CAPTION, CIN, CIP, CLIP, CMYK, CMYKA, CR2, CRW, CUR, CUT, DATA, DCM, DCR, DCX, DDS, DFONT, DNG, DPX, DXT1, DXT5, EPDF, EPI, EPS, EPS2, EPS3, EPSF, EPSI, EPT, EPT2, EPT3, ERF, FAX, FILE, FITS, FRACTAL, FTP, FTS, G3, G4, GIF, GIF87, GRADIENT, GRAY, GRAYA, GROUP4, H, HALD, HDR, HISTOGRAM, HRZ, HTM, HTML, HTTP, HTTPS, ICB, ICO, ICON, IIQ, INFO, INLINE, IPL, ISOBRL, ISOBRL6, JBG, JBIG, JNG, JNX, JPE, JPEG, JPG, JPS, JSON, K25, KDC, LABEL, M2V, M4V, MAC, MAGICK, MAP, MASK, MAT, MATTE, MEF, MIFF, MKV, MNG, MONO, MOV, MP4, MPC, MPEG, MPG, MRW, MSL, MTV, MVG, NEF, NRW, NULL, ORF, OTB, OTF, PAL, PALM, PAM, PATTERN, PBM, PCD, PCDS, PCL, PCT, PCX, PDB, PDF, PDFA, PEF, PES, PFA, PFB, PFM, PGM, PGX, PICON, PICT, PIX, PJPEG, PLASMA, PNG, PNG00, PNG24, PNG32, PNG48, PNG64, PNG8, PNM, PPM, PREVIEW, PS, PS2, PS3, PSB, PSD, PTIF, PWP, RADIAL-GRADIENT, RAF, RAS, RAW, RGB, RGBA, RGBO, RGF, RLA, RLE, RMF, RW2, SCR, SCT, SFW, SGI, SHTML, SIX, SIXEL, SPARSE-COLOR, SR2, SRF, STEGANO, SUN, TEXT, TGA, THUMBNAIL, TIFF, TIFF64, TILE, TIM, TTC, TTF, TXT, UBRL, UBRL6, UIL, UYVY, VDA, VICAR, VID, VIFF, VIPS, VST, WBMP, WEBP, WMV, WPG, X, X3F, XBM, XC, XCF, XPM, XPS, XV, XWD, YCbCr, YCbCrA, YUV
gd_version: 2.2.5
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: unknown

### wp-server ###

server_architecture: Linux 5.10.162+ x86_64
httpd_software: Flywheel/5.1.0
php_version: 7.4.33.2 64bit
php_sapi: fpm-fcgi
max_input_variables: 5000
time_limit: 178
memory_limit: 384M
max_input_time: 60
upload_max_filesize: 300M
php_post_max_size: 300M
curl_version: 7.68.0 OpenSSL/1.1.1f
suhosin: false
imagick_availability: true
pretty_permalinks: true
htaccess_extra_rules: true

### wp-database ###

extension: mysqli
server_version: 5.7.39-google
client_version: mysqlnd 7.4.33.2
max_allowed_packet: 33554432
max_connections: 4030

### wp-constants ###

WP_HOME: https://heartofthehealer.org
WP_SITEURL: https://heartofthehealer.org
WP_CONTENT_DIR: /www/wp-content
WP_PLUGIN_DIR: /www/wp-content/plugins
WP_MEMORY_LIMIT: 384M
WP_MAX_MEMORY_LIMIT: 384M
WP_DEBUG: false
WP_DEBUG_DISPLAY: true
WP_DEBUG_LOG: false
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: undefined
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8
DB_COLLATE: undefined

### wp-filesystem ###

wordpress: not writable
wp-content: writable
uploads: writable
plugins: writable
themes: writable
mu-plugins: writable

### pods ###

pods-server-software: Flywheel/5.1.0
pods-user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
pods-session-save-path: /tmp
pods-session-save-path-exists: Yes
pods-session-save-path-writable: Yes
pods-session-max-lifetime: 1440
pods-opcode-cache-apc: No
pods-opcode-cache-memcached: No
pods-opcode-cache-opcache: Yes
pods-opcode-cache-redis: No
pods-object-cache-apc: No
pods-object-cache-apcu: No
pods-object-cache-memcache: No
pods-object-cache-memcached: Yes
pods-object-cache-redis: No
pods-memory-current-usage: 166.059M
pods-memory-current-usage-real: 4.000M
pods-network-wide: No
pods-install-location: /www/wp-content/plugins/pods/
pods-developer: No
pods-tableless-mode: No
pods-relationship-table-enabled: Yes
pods-light-mode: No
pods-strict: No
pods-allow-deprecated: Yes
pods-api-cache: Yes
pods-shortcode-allow-evaluate-tags: No
pods-sessions: Disable sessions
pods-can-use-sessions: Yes
pods-relationship-table-status: 13

`

Pods Package

{
    "@meta": {
        "version": "2.9.13",
        "build": 1680134341
    },
    "settings": {
        "types_only": "0",
        "watch_changed_fields": "1",
        "metadata_integration": "1",
        "metadata_override_get": "1",
        "session_auto_start": "0",
        "wisdom_opt_out": ""
    },
    "pods": [
        {
            "name": "sales_page",
            "id": 21531,
            "label": "On-Demand Courses",
            "description": "",
            "label_singular": "On-Demand Course",
            "public": "1",
            "show_ui": "1",
            "supports_title": "1",
            "supports_editor": "0",
            "type": "post_type",
            "storage": "meta",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "post",
            "capability_type_custom": "sales_page",
            "capability_type_extra": "1",
            "has_archive": "1",
            "hierarchical": "0",
            "rewrite": "1",
            "rewrite_with_front": "1",
            "rewrite_feeds": "0",
            "rewrite_pages": "1",
            "query_var": "1",
            "can_export": "1",
            "default_status": "draft",
            "supports_author": "1",
            "supports_thumbnail": "1",
            "supports_excerpt": "1",
            "supports_trackbacks": "0",
            "supports_custom_fields": "0",
            "supports_comments": "0",
            "supports_revisions": "0",
            "supports_page_attributes": "0",
            "supports_post_formats": "0",
            "built_in_taxonomies_category": "1",
            "built_in_taxonomies_elementor_font_type": "0",
            "built_in_taxonomies_elementor_library_category": "0",
            "built_in_taxonomies_elementor_library_type": "0",
            "built_in_taxonomies_event-categories": "0",
            "built_in_taxonomies_event-tags": "0",
            "built_in_taxonomies_link_category": "1",
            "built_in_taxonomies_media-category": "0",
            "built_in_taxonomies_media-tag": "0",
            "built_in_taxonomies_post_tag": "0",
            "built_in_taxonomies_wp_theme": "0",
            "show_in_menu": "1",
            "menu_position": "20",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "pfat_enable": "0",
            "pfat_append_single": "append",
            "pfat_filter_single": "the_content",
            "pfat_append_archive": "append",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "rest_enable": "0",
            "read_all": "0",
            "write_all": "0",
            "_migrated_28": "1",
            "menu_icon": "dashicons-welcome-learn-more",
            "groups": [
                {
                    "name": "more_fields",
                    "id": 29999,
                    "label": "More Fields",
                    "description": "",
                    "weight": 0,
                    "fields": [
                        {
                            "name": "custom_instructor_thumbnail",
                            "id": 21534,
                            "label": "Custom Instructor Thumbnail",
                            "description": "Custom Instructor Thumbnail",
                            "weight": 0,
                            "type": "file",
                            "required": "0",
                            "file_format_type": "single",
                            "file_uploader": "attachment",
                            "file_attachment_tab": "upload",
                            "file_upload_dir": "wp",
                            "file_edit_title": "1",
                            "file_show_edit_link": "1",
                            "file_linked": "0",
                            "file_limit": "0",
                            "file_restrict_filesize": "10MB",
                            "file_type": "images",
                            "file_field_template": "rows",
                            "file_add_button": "Add File",
                            "file_modal_title": "Attach a file",
                            "file_modal_add_button": "Add File",
                            "file_wp_gallery_output": "0",
                            "file_wp_gallery_link": "post",
                            "file_wp_gallery_columns": "1",
                            "file_wp_gallery_random_sort": "0",
                            "file_wp_gallery_size": "thumbnail",
                            "admin_only": "0",
                            "restrict_role": "0",
                            "restrict_capability": "0",
                            "hidden": "0",
                            "read_only": "0",
                            "roles_allowed": [
                                "administrator"
                            ],
                            "rest_read": "0",
                            "rest_write": "0",
                            "rest_pick_response": "array",
                            "rest_pick_depth": "1",
                            "unique": "0"
                        }
                    ]
                }
            ]
        },
        {
            "name": "sanctioned_teacher",
            "id": 22426,
            "label": "Sanctioned Teachers",
            "description": "",
            "label_singular": "Sanctioned Teacher",
            "public": "1",
            "show_ui": "1",
            "supports_title": "1",
            "supports_editor": "1",
            "type": "post_type",
            "storage": "meta",
            "publicly_queryable": "1",
            "exclude_from_search": "0",
            "capability_type": "page",
            "capability_type_custom": "sanctioned_teacher",
            "capability_type_extra": "1",
            "has_archive": "0",
            "hierarchical": "0",
            "rewrite": "1",
            "rewrite_with_front": "1",
            "rewrite_feeds": "0",
            "rewrite_pages": "1",
            "query_var": "1",
            "can_export": "1",
            "default_status": "draft",
            "supports_author": "1",
            "supports_thumbnail": "1",
            "supports_excerpt": "1",
            "supports_trackbacks": "0",
            "supports_custom_fields": "0",
            "supports_comments": "0",
            "supports_revisions": "0",
            "supports_page_attributes": "0",
            "supports_post_formats": "0",
            "built_in_taxonomies_category": "1",
            "built_in_taxonomies_elementor_font_type": "0",
            "built_in_taxonomies_elementor_library_category": "0",
            "built_in_taxonomies_elementor_library_type": "0",
            "built_in_taxonomies_event-categories": "0",
            "built_in_taxonomies_event-tags": "0",
            "built_in_taxonomies_link_category": "0",
            "built_in_taxonomies_mec_category": "0",
            "built_in_taxonomies_mec_label": "0",
            "built_in_taxonomies_mec_location": "0",
            "built_in_taxonomies_mec_organizer": "0",
            "built_in_taxonomies_mec_speaker": "0",
            "built_in_taxonomies_media-category": "0",
            "built_in_taxonomies_media-tag": "0",
            "built_in_taxonomies_post_tag": "1",
            "built_in_taxonomies_wp_theme": "0",
            "show_in_menu": "1",
            "menu_position": "21",
            "show_in_nav_menus": "1",
            "show_in_admin_bar": "1",
            "pfat_enable": "0",
            "pfat_append_single": "append",
            "pfat_filter_single": "the_content",
            "pfat_append_archive": "append",
            "pfat_filter_archive": "the_excerpt",
            "pfat_run_outside_loop": "0",
            "rest_enable": "0",
            "read_all": "0",
            "write_all": "0",
            "_migrated_28": "1",
            "menu_icon": "dashicons-id-alt",
            "archive_show_in_taxonomies_category": "0",
            "archive_show_in_taxonomies_post_tag": "0",
            "groups": [
                {
                    "name": "more_fields",
                    "id": 30000,
                    "label": "More Fields",
                    "description": "",
                    "weight": 0,
                    "fields": []
                }
            ]
        }
    ]
}
sc0ttkclark commented 1 year ago

Turning the setting for "Watch WP Metadata calls" off in Pods Admin > Settings does resolve this performance issue since the Astra Nav module uses metadata very heavily and can lead to performance degredation.

I'm going to keep this open to work with @lauriebeingdesign so that we can see if there's anything we can do to further optimize Pods for when "Watch WP Metadata calls" is on here.