PageSpeed giving ERR_CONNECTION_FAILED Only on production - pagespeed

We have our development page giving correct score on page speed insights.
https://developers.google.com/speed/pagespeed/insights/?hl=en&url=https%3A%2F%2Fdev.techtitute.com
But our production page always returns scan error:
Lighthouse returned error: FAILED_DOCUMENT_REQUEST. Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Details: net::ERR_CONNECTION_FAILED)
https://developers.google.com/speed/pagespeed/insights/?hl=en&url=https%3A%2F%2Fwww.techtitute.com
The strange thing is that web.dev (which also uses Lighthouse under the hoods) is giving correct score for both pages, also gtmetrix, pingdom and Chrome dev tools Lighthouse tab.
Both pages have the exact same code, both are running on windows Azure App Service.
The only differences are:
On production we are injecting Google Tag Manager scripts with analytics, fb pixel, linkedin and others.
Also we have an azure traffic manager to distribute traffic based on geolocalization of the user (Europe or Latam).
What would you think could be the problem of production page giving that error?
UPDATE 09/07/2020
We have created a parallel environment of traffic manager geographically distributed pointing to 2 app services with the same code as production, but with another domain: dev3.techtitute.com.
Now page speed is giving the same error on this subdomain, as the production one. So we think it's related to azure traffic manager configuration.

Finally we have solved the issue by changing traffic manager on Azure from Geographic Routing to Performance Routing.
Now page speed is giving normal scoring

Related

How to diagnose why one-tap popup not showing in production

I added google one-tap to our web app, tested it well working at localhost (see pic).
After deploying to production (react optimized code), the one-tap dialog doesn't show up, checking network traffic, seems some of the requests are missing compared to localhost, but not sure how to diagnose what the root cause is, any help?
(note: I have tried production URL in incognito mode and restarted my browser)
Localhost: (http://localhost:3000)
Production (https://columns.ai)
I’m not sure if it's related to the OAuth scope, but I added the opened and profile scopes, and it's now working in production. However, I can't verify if this is what fixed it.

Cannot Display Web Application in iframe On Chrome or Edge

I am working on adding a very old web application to a site. We have to display the web application in an iframe on the site. When using Internet Explorer 11, the web application will display in the iframe without an issue. It should be noted that this is an old web app
Chrome and Edge on the other hand will display an error in the developer console: Refused to display '{APPLICATION_URL}' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors {SERVER_NAME}".
One thing to note is that this will not always happen in Chrome and Edge. I'd say about 80% of the time I will receive the error, but 20% of the time the application will load fine in the iframe and have no issues. This makes me think that maybe the issue is specific to a group of servers on our farm, but am unable to prove that.
I have very limited visibility over our servers here, but I can get someone else get me more information if that is needed.
I found the solution for this. One thing to note: Internet Explorer does NOT support the Content-Security-Policy header. That is why this worked in IE 100% of the time. IE was unable to do anything with that header, so it just loaded the app like it thought it was supposed to.
I was able to work with some people who have access to the servers that the web application is hosted on. I found the problem was caused by an IIS setting for the default site that the applications on this one server belong to.
There are two servers that host the application, and a load balancer will direct you to a server depending on traffic. One of the servers added an HTTP header for the content security policy to all outbound traffic for the applications on the server. This explained why sometimes the app would load fine, and other times it would fail.

F5 Add apm_do_not_touch to HTML response to the end user

I am supporting ASP.NET application running on 3 web servers and have F5 system as firewall and load balance. Actually I don't have experience at all in F5 system but the following issue seems to be related to it
The issue happened after we applied F5 load balancing. Simply it cause JavaScript in the web page to fail sometimes. After refresh the web page it will work fine
To trace the issue I compared the response that fail and the one that success after refresh. The difference was the failed one contains html tag that is not added by our application apm_do_not_touch with a script tag inside it
It seems that happen when the F5 switch between one server to another one as the issue solved when we redirect all the traffic to only one server
Any advice, what is the possible cause and how we can solve it?
APM is F5's Access Policy Manager module and is used for VPN, Web Portals, and federated authentication. The apm_do_not_touch tag is part of this product and is used when you want to prevent the APM module from rewriting portions of HTML such as external links.
If you're not accessing the application through a web portal, this should not be applied and you'll need to work with whomever setup the access policy to resolve as the APM policy is being applied to your application possibly erroneously.
Here is more information on the apm_do_not_touch tag. Depending on your version, there was a known issue for #cc_on in F5 BIG-IP version 11.1 who's workaround was to prevent the APM module from rewriting that command. The same workaround may pose a solution for you. Either way, there are additional complexities to your client traffic flow that you will need to engage your network team/BIG-IP administrators with to ensure your application and their policies don't clash.
It could be as simple as removing the APM policy from your application's pathway but your admins will be able to identify if it's required for external access or reverse proxy requirements.

How to find out why my website is slow loading

I have an ASP.NET website that is hosted with https://www.blacknight.com/.
Whenever I browse to my website in my browser it can take up to 10 seconds to appear.
How can I determine where the bottleneck is?
How can I determine if its the web hostings fault or if its due to my own website?
Are there tools that I can use etc
Frequently when deploying ASP.NET websites to hosting providers the application may become idle and unloaded from memory in a Shared environment. The resulting behavior is that any "new" visits to the website after it's become idle for some time results in a JIT recompilation of the web application before being served again.
Typically hosting providers offer some form of "always on" option for your website which prevents this behavior. Otherwise, in the case of infrequently visited websites, this behavior is par for the course.
Depending on your hosting provider they may respect your web.config entries to allow "Always On" in IIS. You can find more information on this approach here
Hope this makes sense. It is incredibly common for lower traffic websites in Shared environments.
Well just from looking at your code, you need to change some stuff
First, load the scripts at the end of the body to allow the website to load faster.
One of your CSS if called upon after the body tag, call it inside the head tag.
Also do a resource speed test. Do this easily by going on Google Chrome. Right click, select inspect element, then select Network. Press the red button and reload the page. This will show you how fast the resources are loading. There are also test on pingdom which will show you how fast your website loads and the score of it, it also compares your website to other websites.
But this all may not be the case, it just may be your server. Get a dedicated server with at least 10mpbs. You can also get Cloudflare to speed up the process. Also consider using a CDN to load your website faster.
Good Luck

Session timeout after some seconds in Umbraco

I have created an site on Umbraco 7.1.6 it was working perfect in Visual studio 2012; when I deployed it to my hosting space I found a problem that it redirects me to login screen again and again just after some seconds. I have set keep user login to true and increased timeout but no improvement.
When I searched for that problem I found some links:
https://github.com/umbraco/Umbraco-CMS/compare/release-7.1.6...7.2.0
http://issues.umbraco.org/issue/U4-3845
https://github.com/Umbraco/Umbraco-CMS/commit/c936aaa51753862914591b753f7f2d7be7749cf7
First link provide me file but I do not know how to updated my current site.
In console I am getting an error.
GET http://example.com/umbraco/backoffice/UmbracoApi/Authentication/GetRemainingTimeoutSeconds 401 (Unauthorized) angular.min.js:106(anonymous function) angular.min.js:106o angular.min.js:102g angular.min.js:100i angular.min.js:79i angular.min.js:79(anonymous function) angular.min.js:80e.$eval angular.min.js:92e.$digest angular.min.js:90e.$apply angular.min.js:92safeApply umbraco.services.js:58(anonymous function) umbraco.services.js:6773(anonymous function) angular.min.js:108e angular.min.js:31(anonymous function)
I just experienced the exact same symptoms. A site ran just fine locally, using IIS Express, worked fine when deployed to Azure WebSites, but when I ran on a Windows Shared Hosting environment, the back office session would timeout somewhere between a couple seconds and a couple minutes.
I'd get a pop-up authentication window often but not always on the GetRemainingTimeoutSeconds url.
I filed a ticket, and the provider was able to replicate the issue. They said the site was running in full trust.
After enabling 32 bit application support - the issue is resolved.
Thanks to everyone, especially to #Morten Oc who commented.
It's properly something on the hosting. Have you tried other Umbraco installations on hosterpk? Also, try to set the login time (in webconfig) to 0.
I found out a solution that it was due to hosting environment (permissions), I deployed on client's hosting and it works perfectly.
Additionally if you do not have full trust hosting then it would not be able to maintain its session, you would have to configure session to managed in database.
For more info how to configure please refer to this post:
https://www.saotn.org/configure-sqlserver-sessionstate-for-umbraco/

Resources