php/web-php

php.net running slowly

Iron27 opened this issue · 8 comments

I've noticed since (roughly) early 2022 that php.net has been loading much (intermittently) slower than it has since I started using it over a decade ago.

I'm reaching the site from multiple networks / devices / home / office (most of which are 1GB/1GB) and it persists so it's not my network connection.

Pages that used to take < 1 sec to load, can take up to 4 - 7 seconds now during certain times of day (haven't tried finding a pattern). Obviously manageable, but I found these load times very odd as it's an important, text based site.

Anyone else notice this?

Testing clicking through different links and pages on a cable internet connection, I don't notice any slowness issues.
Could this be a regional issue, e.g. firewall in your country?

cmb69 commented

php.net is delivered via CDN, so that may indeed be a regional issue. It might be something else, though.

We can try to investigate the problem but we need more details. Please give us the network trace from your browser or provide some screenshots. At the moment, the issue is unreproducible and we have no information to work with.

Haven't been able to reproduce myself for at least a month now. It honestly read like DNS issues as TTFB was high and once the page started, it loaded almost instantly. Perhaps an issue with the DNS cache in CDN's Phoenix area servers?

It appears to no longer be an issue, but I wanted to offer a heads up and see if anyone else was experiencing the same issues Q1 - Q2 this year. Attaching tracert as requested, but it's moot since I can connect no problem through a browser now - and request time outs are common / mostly meaningless in tracert. Worth noting perhaps that hops 7/8 are to core-backbone.com in UK/Germany respectively.

Going to close this one until I can reproduce. Thanks
php net trace route

Screenshot_2022-10-21_09-03-03

EDIT: Probably an issue with wifi on my router or laptop

I'm encountering this issue in Ontario, Canada on wifi (haven't test wired) - requests take 5 seconds for brand new connections in curl or firefox

It seems like a cold start problem - subsequent requests in a browser instead of curl (or a browser that was closed then reopened) take ~130ms and can be requested in parallel - the browser uses http2

I haven't checked for packet loss (but other requests are slow in general on wifi but not ethernet, and the router is really far away, so maybe it's that)

https://github.com/php/systems/blob/master/php.net.zone - haven't tried other ips

# curl headers
cache-control: max-age=86400
content-encoding: gzip
content-type: text/css
date: Fri, 21 Oct 2022 13:01:20 GMT
etag: "634d461a-7f77"
expires: Sat, 22 Oct 2022 11:06:08 GMT
last-modified: Mon, 17 Oct 2022 12:10:02 GMT
server: myracloud
vary: accept-encoding
x-cdn: 1
 6  Toronto1.Level3.net 56.659 ms  39.491 ms  73.064 ms
 7  * * *
 8  .....core-backbone.com (...)  119.073 ms  123.832 ms  120.524 ms
 9  .....core-backbone.com (...)  137.530 ms  136.733 ms  135.669 ms
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
~ » nslookup www.php.net
Server:         127.0.0.53
Address:        127.0.0.53#53

Non-authoritative answer:
www.php.net     canonical name = www-php-net.ax4z.com.
Name:   www-php-net.ax4z.com
Address: 185.85.0.29
Name:   www-php-net.ax4z.com
Address: 2a02:cb40:200::1ad

@TysonAndre Can you try mobile connection e.g. 5G?

Which HTTP response are you getting? 304 or 200? Which endpoint are you trying to reach?

This is www.php.net/ on my connection with Firefox on cold start
image

Sorry, It's probably a problem with the router I'm using or wireless on my laptop. Ethernet on the same router takes 0.6 seconds instead of 2-5 seconds (I had issues with the cable disconnecting sometimes).

WiFi on the router is slow, even with my laptop right next to the router. Other sites are also affected.

Repeating the same request to https://www.php.net/styles/theme-base.css - it takes 0.6 seconds consistently on ethernet with curl for brand new connections

and in firefox
ethernet_theme_base_download

» time curl https://www.php.net/styles/theme-base.css > /dev/null          
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 32631    0 32631    0     0  56651      0 --:--:-- --:--:-- --:--:-- 56651
curl https://www.php.net/styles/theme-base.css > /dev/null  0.01s user 0.00s system 3% cpu 0.586 total

I figured it out for my own case; it's a problem with my wifi chip and Linux version - it's now consistently taking 0.7-1.1 seconds instead of 2.0-5.0 seconds

https://forums.linuxmint.com/viewtopic.php?t=296886 a different user had a similar problem years ago with the same wifi chip
https://unix.stackexchange.com/questions/269661/how-to-turn-off-wireless-power-management-permanently
https://unix.stackexchange.com/questions/166473/debian-how-to-run-a-script-on-startup-as-soon-as-there-is-an-internet-connecti

(For intel "Wireless 8265 / 8275" version 78 on Linux 5.4 (also seen in Linux 5.15.0-52) in Linux Mint 20.2, similar to ubuntu focal )

(ifconfig showed my wifi network interface name was wlp4s0, this would be different on different computers)

~ » sudo cat /etc/network/if-up.d/wireless_power_management_off
#!/bin/bash

/sbin/iwconfig wlp4s0 power off || true
~ » ls -la /etc/network/if-up.d/wireless_power_management_off     
-rwx------ 1 root root 53 Oct 21 19:06 /etc/network/if-up.d/wireless_power_management_off
# Turn off power management
~ » sudo /sbin/iwconfig wlp4s0 power off
# Turn on power management (previous default), it starts taking longer
~ » sudo /sbin/iwconfig wlp4s0 power on 

After reboot

~ » iw dev wlp4s0 get power_save                      
Power save: off