linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
452 stars 73 forks source link

Deepin webserver slow (some URLs not loading) #3324

Open arch-user-france1 opened 2 years ago

arch-user-france1 commented 2 years ago

I cannot access

  1. Privacy policy (needed serveral attempts)
  2. Documentation
  3. Download page On serveral devices using the same IP because of timeouts. Deepin seems down.

I can only access deepin.org/index/ (but even that takes like 5 seconds to load)

myml commented 2 years ago

Thank you for raising this issue, Can you provide a screenshot of your browser network inspect?

You can refer to the tutorial to do this https://developer.chrome.com/docs/devtools/network/

Screenshot like this

image

arch-user-france1 commented 2 years ago

Thank you for raising this issue, Can you provide a screenshot of your browser network inspect?

You can refer to the tutorial to do this https://developer.chrome.com/docs/devtools/network/

Screenshot like this

image

Hello I am not home for this whole day. I already did that and if I remember correctly it waits for an answer for the redirect which times out and only rarely succeeds. But I'm not sure and there's nothing like that on the phone. I will send a screenshot when I'm home again. Ah maybe you should know that Chromium says "connecting" during this procedure in the bottom right but sometimes it also says "waiting for deepin.org".

arch-user-france1 commented 2 years ago

Here it is (this time the download page loaded successfully but not the developer page):

Bildschirmaufnahme_20220726161407

arch-user-france1 commented 2 years ago

After some time new content got pushed but there's still a huge backlog:

Bildschirmaufnahme_20220726161558

arch-user-france1 commented 2 years ago

This time it loaded. It's definitely a server issue:

Bildschirmaufnahme_20220726161724

It took more than a minute to load

arch-user-france1 commented 2 years ago

After a reload the site still is blank for a long time until it's loaded up.

myml commented 2 years ago

I see it. docs.deepin.org server network is very slow. Can you try https://www.deepin.org/index/en ?

arch-user-france1 commented 2 years ago

Did you read that?

I can only access deepin.org/index/ (but even that takes like 5 seconds to load)

It works. Sometimes the download page does not load though, not only the docs. And the privacy policy too.

arch-user-france1 commented 2 years ago

Looks like at the moment the docs. is affected only. When I first visited the page only the index site worked and everything else timed out.

myml commented 2 years ago

Because docs and index are different servers, I want to see the network inspect of index as reference.

arch-user-france1 commented 2 years ago

Why? You mustn't see that. Because it is a server-issue you can just load it up yourself. The main-page /index/en loads within seconds (2, 3 seconds).

myml commented 2 years ago

image

There seems to be a problem with these static resources from "ecology.chinauos.com", I fixed it. Are things getting better?

arch-user-france1 commented 2 years ago

No - the deepin server is the actual problem. Take a look at this:

image

After a half minute: image

image

arch-user-france1 commented 2 years ago

This time the site didn't load properly:

image

arch-user-france1 commented 2 years ago

image after reloading

https://cdn.dcloud.net.cn/img/shadow-grey.png might be a problem. A site should not stop loading if a 3rd party fails.

But the deepin servers are just too slow - now the homepage took 17 seconds to load.

myml commented 2 years ago

I used multiple website speed test services and the results are not too bad. shadow-grey.png also loads successfully. Maybe check your network?

WebPageTest: https://www.webpagetest.org/result/220728_AiDcDN_13P/

image

Pagespeed Insights: https://pagespeed.web.dev/report?url=https%3A%2F%2Fdocs.deepin.org%2F&form_factor=desktop) image

GTmetrix: https://gtmetrix.com/reports/docs.deepin.org/HeKCBB9v/ image

arch-user-france1 commented 2 years ago

My network is fine. A result of 69% in performance is horrible! Who is administrating the backend? Can you speak to him?

And - as you see - 3 seconds for the largest contentful paint? That doesn't even mean that the site has finished loading.

arch-user-france1 commented 2 years ago

Fact is that I can't get the site loaded on Chromium based browsers and Firefox (unless I reload it and reload it for 30 minutes) - and also fact is that my network is completely fine, I never had any problem. This is the only site that doesn't load probably.

myml commented 2 years ago

This a static page using nginx(runing on Aliyuncloud's Hong Kong server), so it should have nothing to do with the backend.

arch-user-france1 commented 2 years ago

This time the wiki.deepin.org site didn't load at all: The video I recorded was just black because I broke my nvidia drivers I think - but here's the pagespeed insight results: image This time lighthouse says that it couldn't load the site (the "No FPC Event" thing in the bottom right.)

Some complaints I have about this site: There is no text compression The order in which the site is loaded is messed up, results in the site being messed up every time it's reloaded for a half second (even if it's cached any my computer has 16 cores and an M.2 SSD so not a performance problem) The server is so slow that pictures take a second or more to load The site seems to be acccessible using it's IP: 47.75.108.56 The headers include the "server: nginx" header which can be disabled by "server_tokens off;" At the moment of speaking the site got loaded in about 30 seconds because the server needed a long time to send some image: image

Reloading the site by shift-clicking reload needs a LONG time but it takes 19 seconds to load the main page and some images aren't loaded then yet. Maybe reloading the site like this results in a cache-bypass? Should not be used in production, is a DDoS vector.

A solution for the slow server would be to use nginx load balancing: Good official guide: http://nginx.org/en/docs/http/load_balancing.html And if you haven't already, use nginx reverse proxy caching: a very very good guide: https://www.tecmint.com/cache-content-with-nginx/ note that the reverse proxy cache is described further down and has the same syntax.

Now I read your answer "This a static page using nginx(runing on Aliyuncloud's Hong Kong server), so it should have nothing to do with the backend." The server is too slow - then this Aliyuncloud server is too slow and you either have to use bare-metal servers if you don't already or buy more servers and use load balancing and (memory) caching - or your site will be inaccessible, or at least most of the URLs. Maybe you don't have enough RAM available? RAM is used for disk-caching. Have you already looked at the access log? Is someone draining the server resources, DoS? How many cores does this server have? Is there AES-NI support?

arch-user-france1 commented 2 years ago

And maybe it's a bandwith issue. In the worst case you could use cloudflare which I would never do because of privacy issues or you could make the nginx gzip/brotli compression more agressive... Or buy for a better plan...

myml commented 2 years ago

I think this a bandwith issue or a transport issue. These site(docs、wiki or index) are fast on my computer.

Maybe we have to use cdn to solve...

arch-user-france1 commented 2 years ago

So you would use cloudflare -_- ? We'll see. Weird... Why does it load fast on your computer but doesn't load on pagespeed insights etc?

BLumia commented 2 years ago

I guess it's a generic issue when accessing websites that across the world. On my side it's super slow to access invent.kde.org directly, but pretty fast to load docs.deepin.org, for example.

arch-user-france1 commented 2 years ago

But sites / servers not responding is not a generic issue. Seems to be a configuration issue. I cannot do anything on my side... I don't have access to the server.

I guess it's a generic issue when accessing websites that across the world. On my side it's super slow to access invent.kde.org directly, but pretty fast to load docs.deepin.org, for example.

edited!

myml commented 2 years ago

@arch-user-france1 We hava optimized the server network, you can try again.

arch-user-france1 commented 2 years ago

Seems working now, bit slow but that's acceptable if the server's location is in China.

https://cdimage.deepin.com/releases/20.7/deepin-desktop-community-20.7-amd64.iso

This link is still not working. Endlessly loading - the usual symptoms I described.

myml commented 2 years ago

cdimage.deepin.com in Wuhan, China, so.... Recommended using mirrors repository to download system iso. 图片

Such as google drive or other community iso repository, there can be found on the download page

arch-user-france1 commented 2 years ago

Do you think you fixed it? What did you do?

I think the only thing is the ISO so if you don't care about that I think it's fixed.

arch-user-france1 commented 2 years ago

pan.baidu.com won't load which is listed under deepin boot maker but I wouldn't care about that...

BLumia commented 2 years ago

I use two of my servers located in different region to test the connection and it works fine. If you have issue connecting to cdimage.deepin.com I guess it's reasonable to recommend using a mirror instead, and maybe using traceroute to test where the connection get lost...

Also, pan.baidu.com is a 3rd-party site owned by Baidu, if that site failed to load, then I guess it's probably an internet connection issue of your ISP.

arch-user-france1 commented 2 years ago

My ISP does not have any problems. If the package gets dropped it either is

  1. your problem because the server's too weak or bad configuration
  2. your problem because the server is in China and some packages are getting dropped (doesn't make sense, we don't block China's packages???)
  3. your problem because some firewall in China or whatever is there blocks it
  4. your problem because it gets lost on the way (impossible if you're using TCP)

Maybe you should get some server in the USA or better just in the Europe because why always USA.

arch-user-france1 commented 2 years ago

At least most of the site it working now and I guess this issue is halfway resolved. The ISO still cannot be downloaded though which is a bit annoying...

Ah and I'm in Switzerland if you care about my location.

BLumia commented 2 years ago

your problem because the server is in China and some packages are getting dropped (doesn't make sense, we don't block China's packages???)

We don't drop connection either, so using things like traceroute or consume your ISP is probably the only way to do so. If you choose the hacky way (traceroute one, or using similar tools like mtr) then you probably be able to see where your package get lost.

your problem because some firewall in China or whatever is there blocks it

If cdimage is the only site you cannot access then that's possible, but since you said pan.baidu.com is also not accessible so I guess that's probably not our fault since they are a major IT company in China and definiately have huge money and resources to do the infra things.

(impossible if you're using TCP)

That's still possible since TCP is on the top of IP layer. TCP never garantee about IP package delivery. You may need to learn some TCP/IP things, and if you want to validate it by yourself, you can set up netem on your router (I assume you know hwo to do that) and play around with its options :)

Maybe you should get some server in the USA or better just in the Europe because why always USA.

Consider using one of the deepin CD mirrors runned by other open source community:)

Disclaimer: I don't run or maintain any of the server infrastructure used by deepin, but I used to work fulltime in SDN before I join deepin...

arch-user-france1 commented 2 years ago

Traceroute's result seems fine. The problem must be something else.

arch-user-france1 commented 2 years ago

Baidu does not care about network infrastructure. 70% packet loss and 200ms ping while there's 2% packet loss to your domain. Oh it's actually 0 packet loss. A bug in ping is the problem that resulted into fake packet loss.