Page load is slow (10-15secs) but have another environment that is fine


We have a Production environment where load times on some pages are long and are greatly affecting the user experience. But we have a Staging environment with the exact same code and database schema and it is lightning-fast.


  1. We have looked at system resources and experienced slow page loads, the CPU and RAM usage is extremely low and the database storage space is not even close to being full.
  2. If we open a page that has taken a long time to load, then reloading is fast. I spoke to our ModX devs and they looking into the caching and said everything is set up correctly.
  3. On all local environments are not experiencing this problem.

Future test

We are going to connect the production database to staging to see if the problem follows.
We are going to spin up another environment and dump a similar amount of data into it to see if we can replicate the problem


If there is advice on what can be done to fix it or what further tests can be done then we would be grateful.

That’s very long, even for an uncached page. You’d need a lot of complex processing in templates and snippets to get that bad from normal use. Perhaps lots of image processing or calling remote APIs that’s blocking rendering.

Just a hunch: can you make sure your sessions table (modx_sessions) isn’t humongously big?