• Resolved evannagle

    (@evannagle)


    Quick tip of that hat: thanks for making such a spectacular plugin. I use it on all the sites I build, so many thanks!

    I currently have a site with 6K posts. There are 3 taxonomies that are attached to posts.

    When I try to access …/wp-admin/edit.php, I’m getting the following LONG QUERY error:

    SELECT wpposts.ID, ( SELECT COUNT(*) FROM wp_postmeta wpmeta INNER JOIN wp_posts wpmetaposts ON wpmetaposts.ID = wpmeta.post_id AND wpmetaposts.post_type IN ( ‘post’ ) AND wpmetaposts.post_status = ‘publish’ WHERE wpmeta.meta_key = ‘_custom_post_type_onomies_relationship’ AND wpmeta.meta_value = wpposts.ID ) AS count FROM wp_posts wpposts WHERE wpposts.ID IN ( ‘1000197’,’21759′,’21205′,’21204′,’21203′,’21202′,’21201′,’21200′,’21199′,’20207′,’20205′,’20200′,’20149′,’19337′,’19154′,’19139′,’18632′,’18311′,’18306′,’18304′,’18287′,’18285′,’18279′,’18277′,’18275′,’18273′,’18247′,’18086′,’17693′,’17621′,’17284′,’17134′,’16976′,’16970′,’16946′,’16759′,’16703′,’16702′,’16701′,’16699′,’16698′,’16697′,’16696′,’16695′,’16694′,’16693′,’16660′,’16299′,’16192′,’16187′,’16178′,’16176′,’16173′,’16170′,’16169′,’16160′,’16156′,’16154′,’16152′,’16054′,’16053′,’16052′,’15924′,’15890′,’15884′,’15844′,’15831′,’15672′,’15485′,’15406′,’15299′,’15196′,’15180′,’15168′,’15060′,’15005′,’14996′,’14886′,’14749′,’14681′,’14680′,’14679′,’14677′,’14662′,’14610′,’14586′,’14422′,’14421′,’13982′,’13683′,’13682′,’13666′,’13576′,’13568′,’13555′,’13553′,’13495′,’13406′,’13405′,’13399′,’13394′,’13393′,’13392′,’13390′,’13389′,’13354′,’13321′,’13319′,’13302′,’13301′,’13300′,’13299′,’13184′,’13128′,’13075′,’13071′,’12996′,’12774′,’12773′,’12308′,’12197′,’12050′,’12033′,’11782′,’11206′,’10821′,’10820′,’10816′,’10788′,’10286′,’10280′,’10279′,’10278′,’10277′,’10276′,’10275′,’10267′,’10264′,’8753′,’8482′,’8481′,’8480′,’8479′,’8478′,’8477′,’8476′,’8475′,’8445′,’7768′,’7353′,’6948′,’6900′,’6899′,’6898′,’6896′,’6895′,’6894′,’6877′,’6730′,’6611′,’6609′,’6605′,’6565′,’6372′,’5992′,’5660′,’5577′,’5510′,’5492′,’5359′,’5119′,’5004′,’4964′,’4963′,’4961′,’4919′,’4844′,’4817′,’4813′,’4531′,’4052′,’4051′,’4050′,’4048′,’4047′,’4046′,’4045′,’4044′,’4042′,’4041′,’4039′,’4038′,’3987′,’3986′,’3984′,’3983′,’3964′,’3703′,’3699′,’3540′,’3475′,’3474′,’3450′,’3430′,’3403′,’3402′,’3401′,’3336′,’3325′,’3281′,’3243′,’3234′,’3091′,’3041′,’2928′,’2900′,’2889′,’2869′,’2828′,’2826′,’2801′,’2735′,’2719′,’2703′,’2702′,’2699′,’2651′,’2632′,’2631′,’2630′,’2629′,’2568′,’2511′,’2475′,’2407′,’2386′,’2361′,’2332′,’2318′,’2300′,’2123′,’2122′,’2066′,’2042′,’2039′,’2038′,’2004′,’2003′,’2002′,’1974′,’1917′,’1856′,’1673′,’1671′,’1612′,’1532′,’1530′,’1507′,’1455′,’1452′,’1196′,’1189′,’1188′,’1128′,’894′,’893′,’892′,’891′,’855′,’854′,’850′,’609′,’608′,’548′,’449′,’286′,’285′,’241′,’159′,’146′,’144′,’141′,’93’,’92’,’91’,’85’,’84’,’73’,’72’,’71’,’70’,’69’,’68’,’67’,’66’,’65’,’64’,’63’,’62’,’61’,’60’,’59’,’58’,’57’,’56’,’55’,’54’,’53’,’52’,’51’,’50’,’49’,’48’,’47’,’46’,’45’,’44’,’43’,’42’,’41’,’40’,’39’,’38’,’37’,’36’,’35’,’34’,’33’,’32’,’31’,’30’,’29’,’28’,’27’,’26’,’25’,’24’,’23’ ) AND wpposts.post_status = ‘publish’ ORDER BY wpposts.ID ASC

    If I detach all but one of the taxonomies, I can get to …/wp-admin/edit.php. Query monitor shows the following stats:

    ====

    SPEED: 15.03 second load time

    CPT_TAXONOMY->get_terms 4 13.3913
    CPT_TAXONOMY->wp_get_object_terms 2 0.2535

    ====

    So, the two CPT_TAXONOMY calls take up most of the loading time, and adding a taxonomy presumably pushes the wait to be long enough that a 502 response occurs.

    I saw the recent bug reported by ardufour concerning “Memory Problems” (http://wordpress.org/support/topic/memory-problems-2?replies=7), and I pulled the updated cpt-onomy.php file from your repo, but that didn’t fix the problem for me.

    Again, many thanks for the help! If there’s anything else I can do to clarify, please let me know. Whatever insight you’re able to give–I very much appreciate it.

    https://wordpress.org/plugins/cpt-onomies/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Exactly the same problem for me but with 3500 posts. Problem occurred after migrate from shared (Cpanel) to dedicated (Plesk)

    FYI: I just pushed out version 1.3.3 that hopefully takes care of these memory issues. Please let me know if you have any issues. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CPT Onomies causes Bad Gateway error on wp-admin/edit.php page’ is closed to new replies.