• Howdy all. So I’ve been fighting this weird 404 issue relating to AMP and another plugin I have (Directories Pro). Seems everyday both plugins go 404. I thought it was WP-Rocket at first but now I am not so sure.

    Anyway, twice a day AMP and Directories stop serving their pages. I am going to test turning AMP off for a while and see if the problem stops but in trying to diagnose this issue I run across some very strange SQL query behavior.

    I recorded 2 minutes of SQL dump from my server and while I do have a big/busy site, this seems excessive. I see this query:

    DELETE FROM mml_wp_options WHERE option_name = ‘_transient_ampforwp_get_taxonomies’

    About 100 times a minute. Further, the reason I feel these may be related, here are some more logs:

    2020-09-24T18:14:26.936228Z 1428351 Query SELECT option_value FROM mml_wp_options WHERE option_name = ‘_transient_ampforwp_get_taxonomies’ LIMIT 1
    2020-09-24T18:14:26.936771Z 1428354 Query SELECT option_value FROM mml_wp_options WHERE option_name = ‘_transient_ampforwp_get_taxonomies’ LIMIT 1
    2020-09-24T18:14:26.936790Z 1428351 Query INSERT INTO mml_wp_options (option_name, option_value, autoload) VALUES (‘_transient_ampforwp_get_taxonomies’, ‘a:7:{s:16:\”event-categories\”;s:14:\”Event Category\”;s:20:\”dining_guide_dir_cat\”;s:23:\”Dining Guide – Category\”;s:16:\”listings_dir_cat\”;s:29:\”Directory Listings – Category\”;s:20:\”dining_guide_dir_tag\”;s:18:\”Dining Guide – Tag\”;s:16:\”listings_dir_tag\”;s:24:\”Directory Listings – Tag\”;s:20:\”dining_guide_loc_loc\”;s:23:\”Dining Guide – Location\”;s:16:\”listings_loc_loc\”;s:29:\”Directory Listings – Location\”;}’, ‘yes’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload)
    2020-09-24T18:14:26.937542Z 1428354 Query INSERT INTO mml_wp_options (option_name, option_value, autoload) VALUES (‘_transient_ampforwp_get_taxonomies’, ‘a:7:{s:16:\”event-categories\”;s:14:\”Event Category\”;s:20:\”dining_guide_dir_cat\”;s:23:\”Dining Guide – Category\”;s:16:\”listings_dir_cat\”;s:29:\”Directory Listings – Category\”;s:20:\”dining_guide_dir_tag\”;s:18:\”Dining Guide – Tag\”;s:16:\”listings_dir_tag\”;s:24:\”Directory Listings – Tag\”;s:20:\”dining_guide_loc_loc\”;s:23:\”Dining Guide – Location\”;s:16:\”listings_loc_loc\”;s:29:\”Directory Listings – Location\”;}’, ‘yes’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload)
    2020-09-24T18:14:27.333675Z 1428352 Query SELECT autoload FROM mml_wp_options WHERE option_name = ‘_transient_ampforwp_get_taxonomies’
    2020-09-24T18:14:27.335178Z 1428352 Query DELETE FROM mml_wp_options WHERE option_name = ‘_transient_ampforwp_get_taxonomies’
    2020-09-24T18:14:27.343437Z 1428352 Query SELECT option_value FROM mml_wp_options WHERE option_name = ‘_transient_ampforwp_get_taxonomies’ LIMIT 1
    2020-09-24T18:14:27.344059Z 1428352 Query INSERT INTO mml_wp_options (option_name, option_value, autoload) VALUES (‘_transient_ampforwp_get_taxonomies’, ‘a:7:{s:16:\”event-categories\”;s:14:\”Event Category\”;s:20:\”dining_guide_dir_cat\”;s:23:\”Dining Guide – Category\”;s:16:\”listings_dir_cat\”;s:29:\”Directory Listings – Category\”;s:20:\”dining_guide_dir_tag\”;s:18:\”Dining Guide – Tag\”;s:16:\”listings_dir_tag\”;s:24:\”Directory Listings – Tag\”;s:20:\”dining_guide_loc_loc\”;s:23:\”Dining Guide – Location\”;s:16:\”listings_loc_loc\”;s:29:\”Directory Listings – Location\”;}’, ‘yes’) ON DUPLICATE KEY UPDATE option_name = VALUES(option_name), option_value = VALUES(option_value), autoload = VALUES(autoload)

    The AMP plugin is grabbing those taxonomies from the Directories plugin, and I’m not sure why.

    I cannot find a system cron or a WP cron at the hours of 11:15 am and 11:15 pm (twice daily) but this is when amp and Directories stop working and go 404. The fix is to run WordPress optimize database and it all comes back.

    Any ideas? Any nudges in the right direction would be helpful, losing sleep over this one.

    • This topic was modified 5 years, 6 months ago by reverendcatch.

The topic ‘Database transactions’ is closed to new replies.