(solved) Grav on Test-System = fast on Live-System = slow (same server)

Dear forum,

I am struggling with a performance problem:

I am very happy with my test system, it runs well. It has the latest GRAV installed and runs with a “child theme” based on Antimatter. My development work has been limited to the theme (colors and fonts).

But if I now copy the complete content (grav, user,theme …) to the live system (rsync -av ./test/ → /live/) the live system is so slow that the pages sometimes take up to 10 seconds to load.

The only difference is in the .htaccess: once I force the loading over http (test system) and once over https (live system).

I suspect that I’m doing something wrong, but I’m not sure what it could be.

About your support I would like to thank you in advance.

BR.

Update: Both the backend and the frontend are affected.

Performance test-system:

Performance live-system:

@Paul2022,

I have no answer, but only suggested tests…

  • In case you also copied /cache, does $ bin/grav cache make any difference?
  • How does live system perform compared to test system when using same .htaccess from test system?
  • How does a clean install of Grav perform on live system compared to test system?

Thanks for your answer and sorry for my very long comment, I would like to provide as much information as (maybe) needed.

  1. $ bin/grav cache: no changes, the same behavior, unfortunately.

  2. The test-system and the live-system are on the same server (huge provider in Germany). The only difference is, that the sub-domain is referring to a different folder. Every single file is exactly the same. copied from “test-folder” to “live-folder”. I am using also the same .htaccess

  3. the clean installation:

3.1) I started with a change of the redirection of the folder for the live-system to a folder called “maintenance” (backend of the provider). This folder includes a simple html-file with the information “currently under maintenance” and a .htaccess file, which redirects every 404, … to the index.html => everything was fine, the message appeared every time, when I entered the domain within the browser.

Old: www.myurl.com => $HOME/folder-for-live-system

New: www.myurl.com => $HOME/folder-for-maintenance

3.2) Then I have installed GRAV from scratch in a folder called “live-system-v2”. Forthat I created another sub-domain, with a redirection to this folder. After the first configuration (admin, password,…) I checked the side (included pages of Antimatter) and everything was running as expected.

testsystem2.myurl.com => $HOME/folder-for-live-system-V2

3.3) I moved to the theme Antimatter my own child-theme (with custom.css) to this new subfolder and after that I activated my own theme => everything was fine. Colors, fonts, everything was as expected.

3.4) Then I started with the move of some already created pages to the new folder. The numbering of the pages was clear and every number of a page was unique (01.xxx, 02.xxx …): everything was as expected.

3.5) After that I moved all the other pages (approx. 30 pages) to the new sub-folder => everything was fine.

3.6) I configured some plugins, like the error-page plugin (with the refer to the proper page) and other small things. Everything from the backend of GRAV. No changes in the base configuration of GRAV.

The side was really fast and I was happy.

Then I logged in at the providers backend and changed the redirection folder for the domain to the new folder (step 3.1 - 3.6). After that the site was horrible slow.

So far: testsystem2.myurl.com => $HOME/folder-for-live-system-V2

Now: www.myurl.com => $HOME/folder-for-live-system-V2

Well, as you already mentioned, I have cleared the cache a) via GRAV’s backend and b) also via the terminal. Nothing changed: the load of a page takes up to 30 seconds.

When I switch back to the combination, that the url for the test-system redirects to this folder “V2”, everything is fine. Means the website is fast again.

The only difference is: that the sub-url has no https (certificate) and the main domain www.myurl.com has https. Well, that are the only differences (force_ssl: false) for the test-system and (force_ssl: true) for the live-system.

Is that maybe the problem, the https?

O-M-G … the SSL certificate was the problem …

There a 5 SSL-certificates included within my hosting package:

1 x “included SSL”
4 x “SSL Basic”

The domain was allocated to the “included” SSL.

After I allocated for the domain one of the “SSL Basic” certificates, everything was up-and-running. An other domain which is now allocated to the “included” one is now very slow. I have to talk to the provider :wink:

Nevertheless, your answer and your important questions were the base for me to find the root cause.

Thanks a million … and good night (Germany)