Saving Large Menu and Posts with many Custom Fields alway results in a Timeout

Why I’m Post in Bedrock

Even though this might just be WordPress, I thought it would be a good idea to post in bedrock, in case there is a WordPress or server configuration I am missing.

WordPress Data Info

  • 39,000 rows in wp_posts
  • 420,000 rows in wp_postmeta

Problems Encountered

Get timeout errors whenever we:

  • Save certain post types that have many custom fields
  • Saving a large menu (92 items)
  • General backend admin slowness

Solutions Tried

  • Increased the max_input_vars a while ago, so that fixed the issue where the menu would never save.
  • I have increased the memory to 384MB, which fixed some white page/member issues.
  • Increased server timeout from 30 seconds to 120 seconds.
  • Disabling all plugins still encounters the issue when saving our large Menu

Server Specs

We provisioned our own server copying almost all the settings Bedrock/Trellis suggests with minor modifications.

  • Ubuntu 14 LTS
  • 8GB Ram Server hosted on Rackspace
  • PHP 5.6
  • Nginx

Notable Plugins in Use

  • Advanced Custom Fields PRO
  • Posts2Posts
  • W3TotalCache
  • Timber
  • Redirection
  • SearchWP
  • WordFence

Can someone point me in the right direction to debug these issues?

Why is WordPress on the backend so slow and timeout constantly? I am hoping there’s simply a configuration setting I am missing. We haven’t split up the app just yet (2 app servers behind a load balancer, 1 db server), but definitely can. Wasn’t sure if bedrocks has a cap deploy command for that?