TTFB very long first time you access the website - wordpress

I have an issue with a WordPress website I made: https://j-martini.com
Sometimes (generally the first time you access the website), the time before even HTML gets loaded can be very long (for example on this capture, 8s: https://postimg.cc/qgR0xqKm
I have no idea where the issue is coming from and since every time I test the website with tools such as GTmetrix I get a good result, I don't how to monitor the issue.
I contacted my hosting service, Scaleway, because I'm suspecting a slow server, but they're trying very bad to not help me at all. Even if it doesn't come for the server I kind of hoped that they could help me figure out where the problem is, but apparently not.
Any help would be very appreciated!

Related

Change time of cache expiry

I've built my first woocommerce website. It worked great until I've migrated it from my local machine to shared godaddy hosting. This shared hosting has many many limits in loading speed and I've encountered a strange behaviour. I've sent a request to get my website but I have to wait approx. 40 seconds so it loads. After that, all the requests to the server had normal response time (1-5s). But then, after noone had used my website in 1 hour, this behaviour happened again - first load takes 40 secs., after that website is loading normally. I've digged a lot on that and I found that might be the cache issue (I know it might be obvious, but I'm a newbie and it took me a lot to figure it out :D). But I have not really found any solution or help to my issue anywhere in the internet so I'm asking you here for the help. So now, finally, my question is: how do I change the time of expiry for wordpress/woocommere application cache? If I change it to, let's say, 24h, it should work for me I guess. But then comes second question - when I change the cache expiry time for my website, what if I change it's content and let's say add new products to the store. Would it return the cached website without new products? Because if I understand it well, it would be wise to cache as long as possible constant elements (plugins, themes, etc.) but only them, nothing else. I would be really grateful for any help and guidance to eliminate "the first 40s loading time".

IIS 8.5 "Connection was reset" Error on Chrome When Posting, but Works For Get Requests

I have been working on an intranet site and recently users have been complaining that when they save a change they get "This site can’t be reached." The users are using Chrome exclusively as far as I can tell, and when I tested with Edge, I got no errors. So, I first tested on the web server, I was unable to recreate the issue. I tried on another server within the network and I was also unable to recreate the issue. I then tried my pc, which was connected through a VPN and was finally able to recreate the issue. What is weird is that this just started happening and I haven't updated the site in quite awhile. The can view most pages and the issue only seems to happen when posting to IIS. At this point, I am not sure where to start to troubleshoot this issue. Any help would be appreciated.
Edit: Updated the title to show the actual error I got.
Edit 2: Someone put me on to checking the httperr log and I see an error for the post request with client_reset as the error message. hope that makes the issue a bit more clear.
I found the issue with help from the network security firm the client was using. Once I was able to confirm the issue only occurred when clients who were using a VPN, he ran some tests. The issue was that the firewall was blocking posts that seemed suspicious. Now, this site has been running for years with no issues. My assumption is that they made some security changes and it caused this problem. What was odd, was that I tried a few fixes and they would work for a few times and then would stop working, such as using the site ip address versus the domain name. I hope this helps the next person.
Wade

First Byte Time scores F

I recently purchased a new theme and installed wordpress on my GoDaddy hosting account for my portfolio. I am still working on it, but as of right now I sometimes get page load speeds of 10-20seconds, and others 2 seconds (usually after the page has been cached). I have done all that I believe I can (without breaking the site) to optimize my performance speed (reducing image sizing, using a free CDN, using W3 Total Cache, etc).
It seems that my main issue is this 'TTFB' wait time I get whenever I go to a new page that hasn't been cached yet. How I can fix this? Is it the theme's fault? Do I NEED to switch hosting providers? I really don't want to go through the hassle of doing that and paying So much more just to have less than optimal results. I am new to this.
My testing site:
http://test.ninamariephotography.com/
See my Web Page Results here:
http://www.webpagetest.org/result/161111_9W_WF0/
Thank you in advance to anyone for your help:)
Time To First Byte should depend on geography. I don't think that's your problem. I reran your test and got a B.
I think the issue is your hosting is a tiny shared instance, and you're serving static files. Here are some ideas to speed things up.
Serve images using an image-serving service. Check out imgix which is $3/m. It could help in unexpected ways serving images off an external domain depending on HTTP protocol version and browser version, and how connections are shared.
Try lossy compression. You lose some image detail, but you also lose some file size. Check out compressor.io for an easy tool.
Concatenate and minify scripts. You have a number of little javascript files that load individually. Consider joining them together and minifying. I don't know the tool chain for Wordpress, perhaps there's a setting?
If none of that helps, you should experiment with different a hosting choice.

Huge loading time on some pages

Here is my page URL: www.1800-gifts.com/USA/Cake-Delivery and other pages like that all are loading very slow even i have caching , compression enabled, i have tried to call go daddy which is my hosting provider but they do not respond positive.
Developer is telling me that it is a server issue, but i don't find any issues in server it is fine.
This website is developed in asp.net 4.0, database is mssql 2012 r2.
server is VPS, with 2 gb of ram, I have 2 GB data in database, and some table contains more than 100k records.
Please look at my site and give me suggestions, i have checked in google page speed and other tools they are all saying different views.
I am not sure if this is the cause but if you enable developer mode (F12) and run the site in chrome you will see that the cake-delivery page is the one that is causing the loading time (44s). You will also notice that there are JQuery errors on the page.
This could possibly be part of the problem.
EDIT:
After looking at the linked page I think Erik is right, JQuery is not the issue.
The person that is developing the site needs to revisit the way the page works completely. There is a massive amount of operations happening in the page load of the page. The operations that are used are also hack and slash ways of doing things that there is already built in methods for. This is simply a page taking forever to load due to bad coding.
I would suggest the developer returns to the drawing board.
There are a lot of great tools that look at your page and tell you what might be wrong with it. Analyzing your page with GTmetrix for example gives you this. There are also important tips you can work on right away, for example:
gzip compression
Minifying css, html and js
Concatenating scripts
and a lot more. I also recently wrote an article showing important optimization for web performance
Looking at the waterfall chart of your page (also available on GTmetrix) shows that the biggest problem is indeed your server. It takes 16 seconds to receive an answer for the first request (time-to-first-byte). There is clearly something wrong!
There are a lot of things that could be wrong on your server. You should test your database queries (are they slow? How many are performed for a page load?).

Quickiest way to determine why a site is sluggish?

I just picked up a client who's Wordpress web site takes anywhere between 8 to 22 seconds to START loading. The loading delay also occurs when using the Wordpress backend so I'd like to fix the loading issue first before starting my work (template re-design). What's the quickest yet efficient way to determine why this Wordpress site is taking so long to start loading?
Thanks in advance
P.S. - They currently have a caching plugin installed (WP Super Cache) which I assume the previous web developer installed to help with the loading issue but it only helps with the front-end and not the back-end.
Try to run some test like YSlow and Google Page Speed and read their results and suggestions.
Google Speed Online is helping me a lot with analysis of my websites.
http://pagespeed.googlelabs.com/
I use browsermob. They use real browsers to test the site load performance. Shows very nice graphs showing how long each and every request took. Also shows how many requests happen in parallel. As they use real browser, you can see how long it will take to load on a real browser. Then you can choose from which location you want to test. You can choose a UK location to test how fast your page loads from UK.
By the way, I am in no way related to browsermob. I just happen to be a satisfied user of this.
And it is free.
Your server is probably loading far too many modules and is thrashing the disks as it's run out of memory.
You need to both reduce how much memory each PHP instance consumes and limit how many PHP instances can run simultanouesly to ensure you don't use virtual memory for your PHP instances.
I've written a detailed answer to a very similar problem here on Stack Overflow:
How can I figure out why my Wordpress pages load so slowly?
Well, i have came across a similar situation, such things happen when your website is hosted on a GridHosting server, which means it changes according to the server load, but sometimes the things are just opposite the scenario, the best way to check why it is slow is to first ping the website at random interval , so in this way you will know if the distance is the cause or the packet dropping is the issue, secondly, you need to make sure your server's configurations is good, i.e; request your host about a RAW log of your website, in this way you can know what is it taking long for your server to response, and the least best method is to check and make sure that your DNS resolves in a good time, and try to use some free CDN services like CloudFlare.
Hope this helps.

Resources