Title: Database transactions
Last modified: September 24, 2020

---

# Database transactions

 *  [reverendcatch](https://wordpress.org/support/users/reverendcatch/)
 * (@reverendcatch)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/database-transactions/)
 * 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](https://wordpress.org/support/users/reverendcatch/).

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

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [reverendcatch](https://wordpress.org/support/users/reverendcatch/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/database-transactions/)
 * Status: not resolved