Jump to content

High Server Response Time with ProcessWire CMS


DrFux
 Share

Recommended Posts

Hey, sometimes i have for my first request for the .html a waiting time of over 3000ms (source: screenshot attached). This happen to my own templates but its even happen with the processwire standard template.

for example: gentledram.de/whisky/

Is there anything i can config in processwire to reduce the server response?

Thanks

post-2023-0-05629600-1390290361_thumb.jp

Link to comment
Share on other sites

Hey, its only happen sometimes, but even 600ms is really high in my opinion. And it tried different networks (work, home, friends, etc)

I tried the built-in page cache, but it seems it doesn't work, cause after loading the page the first time, the page doesn't load faster the next time.

Is there something i must config in the .htaccess or somewhere else to make the built-in page cache run?

Link to comment
Share on other sites

I notice that you have JQuery called in the head of your page - the same with main.js. That means that the page is having to load the JQuery library in full before it can even get going with the rest of your page

Moving those to the end of the page would speed things up a bit.

  • Like 1
Link to comment
Share on other sites

Thanks for your answer.

does that effect the server response time for the html, like in my screenshot of my first post shown?

Cause my problem is not the loading of request just the waiting time after the server response the first time.

The problem seems to lie on the html /php file.

Has anyone a idea why the built in page/template cache doesnt seem to work?

Link to comment
Share on other sites

Your server response time has nothing to do with ProcessWire perse. This could have many reasons. Since I get response times from 300ms to 3000ms, it looks like your Server sometimes is busy. This could be database or other general server process running.

You should ask this question to your hosting support.



Has anyone a idea why the built in page/template cache doesnt seem to work?

Template cache only works for not logged in users, as it shows on the template cache option settings.

  • Like 1
Link to comment
Share on other sites

Your server response time has nothing to do with ProcessWire perse. This could have many reasons. Since I get response times from 300ms to 3000ms, it looks like your Server sometimes is busy. This could be database or other general server process running.

You should ask this question to your hosting support.

Template cache only works for not logged in users, as it shows on the template cache option settings.

Hi Soma,

thank you for your answer.

I ask my hosting support already, but because i know that if they dont find anything they will blame it on my cms. And then i could say that i have checked everyhing with the help of some professionals and the CMS isnt the problem.

To test the page cache i used a different browser and i was logged out, but i still get repsonse time like 1sec. I would buy ProCache but im afraid that it doesnt work like the page cache. Have the ProCache installation issues?

If its really the host. Could someone recommend me a good europe host?

And thank you all again for your time and help.

Link to comment
Share on other sites

Yeah that's easy for them to blame your CMS :)

Well you can try and for example save your homepage html to a static file, and upload that to your server and load it and see. (this would be same like using ProCache)

I think we can't rule out ProcessWire, but most likely it's not but rather the server being busy with other things or some database connection lagging etc.

  • Like 1
Link to comment
Share on other sites

You could also debug the render time of your page with

at the very beginning of your template code:

$renderTime = Debug::timer();

and at the end of all when everything is output.

echo "rendertime: " . Debug::timer($renderTime);

And see what you got.

  • Like 1
Link to comment
Share on other sites

You could also debug the render time of your page with

at the very beginning of your template code:

$renderTime = Debug::timer();

and at the end of all when everything is output.

echo "rendertime: " . Debug::timer($renderTime);

And see what you got.

Great idea. I gonna implement it when i'm at home. If the response time is 1000ms and the render time of the php is 300 ms what would that mean for the host and me?

Link to comment
Share on other sites

I should point out that when I looked at your page it loaded pretty quickly, to be honest.

Yeah, i reduced everything i could. In the near future i want to minify the html, js, css and include gzip and expire headers. But only the server respones times is a pain in the ***. I showed my site a good friend and it loads 7 sec on his pc & 6 sec was waiting time for the server again.

Link to comment
Share on other sites

You are also hosting in the US with One?

If it is for a German market you should really host in Germany, or at least in Europe. We have a few German, Dutch and Swiss users here - I am sure they know of reliable hosts.

I also use CloudFlare who have data centres in Frankfurt among other places - that can speed things up.

Link to comment
Share on other sites

You are also hosting in the US with One?

If it is for a German market you should really host in Germany, or at least in Europe. We have a few German, Dutch and Swiss users here - I am sure they know of reliable hosts.

I also use CloudFlare who have data centres in Frankfurt among other places - that can speed things up.

Its for germany, and i think my host sits in denmark

Link to comment
Share on other sites

There are more stats and stuff queried then only the link to the server. Sometimes visiting a page will result in a "browser page" that says "this page looks suspicious". The URL has to be translated to an IP. And maybe Google wants to know if the lady has dinner ready.

It'll do all these things before serving you. (some things you like other things you don't want) If there's one thing hanging, the waiting is for you. [ nice gift  :blink:  ]

Link to comment
Share on other sites

I actually have build a site that is hosted by Hetzner in Germany and they have the badest setup for shared server that I ever have seen.

PHP is only running as fcgi, not as apache module and the MySQL Server is not reachable via localhost but is on a different machine / IP.

(so every request to the DB needs to use DNS-System too.

I have the same site running for development at http://all-inkl.com - There it is running much much times faster! So, the owner will change to all-inkl now.

Link to comment
Share on other sites

Oké,

Headers of all files send is every time 200.

Would be nice if they were 304.

Take a look at HTML5 boilerplate and then in specific for the htaccess settings.

Or take a look at the wonderfull world of Willy .

Edit: About the 200, my bad !

I enabled: Disable cache (while DevTools is open)

Edited by Martijn Geerts
Link to comment
Share on other sites

I'm getting wait times of around 1 second before a new page starts to load and around 500 milliseconds on a reload from the UK. Certainly looks like geography is against you!

Getting 304 responses on cached elements now, though.  ^-^

  • Like 1
Link to comment
Share on other sites

My rendertime is very high too. Could it be that i have to much php calls?

I have on the one site over 75 <?=$page->...> codes.

And when i looked at myPHPadmin, it looks really chaotic, is that normal, that every field i created gets a own placement in the left ? (Sorry im not so good at phpmyadmin/mysql)

Maybe i make something wrong?

post-2023-0-82876800-1390331553_thumb.pn

Link to comment
Share on other sites

And when i looked at myPHPadmin, it looks really chaotic, is that normal, that every field i created gets a own placement in the left ? (Sorry im not so good at phpmyadmin/mysql)

Maybe i make something wrong?

No, that's normal. Read ryan's post about it here: http://processwire.com/talk/topic/2387-the-structure-of-fields-and-templates/?p=22762

Basically, since any field can be used in multiple templates, you can't simply have a table for each template with the PW fields as mySQL table fields. Plus, several of the more advanced ProcessWire fields have multiple fields of their own in their table in phpMyAdmin (in fact I think most/all have more than one). Therefore any other way of storing them in the database simply wouldn't work as well and would presumably be a nightmare to program for.

  • Like 4
Link to comment
Share on other sites

Hey, my rendertime lies between 0.300s and 1.3s 

I think i will purchase ProCache when my website is in the final state. I think i stay with my host at the moment, and when its getting worse i maybe switch.

But  thank you everybody for investigate and helping me to find the problem. Thank you.

Link to comment
Share on other sites

If rendertime is between 0.3 and 1.3 seconds for the same page? Then it's definately your server that is slowing down not ProcessWire. Could be the server being busy or the database connection is slow and latent. My guess it's a cheap shared server hosting?

You could test a little more and maybe find more details, that you could tell the hoster. If they can't do anything I would change hoster.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...