# 各位大哥，我发现一个奇怪的现象，是啥问题？

**URL:** <https://www.isharkfly.com/t/topic/16695>\
**Category:** Discourse\
**Tags:** discourse\
**Created:** [December 2, 2024, 12:04pm UTC](https://www.isharkfly.com/t/topic/16695 "2024-12-02T12:04:31Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ava](https://www.isharkfly.com/user_avatar/www.isharkfly.com/ava/32/15917_2.png) [@Ava](https://www.isharkfly.com/u/Ava)\
**Post date:** [December 2, 2024, 12:04pm UTC](https://www.isharkfly.com/t/topic/16695/1 "2024-12-02T12:04:31Z")

</div>

都是使用谷歌浏览器，只要在该网页什么不动一下，时间过一点点，都出现这类的问题，只能刷新才能解决问题，

视频中的页面，都点击了，浏览器的网址也变了，但整个页面没见动，为啥？

我试了其他的网站，也是用Discourse，倒时没有出现此现象。

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [December 2, 2024, 2:27pm UTC](https://www.isharkfly.com/t/topic/16695/2 "2024-12-02T14:27:19Z")

</div>

这个问题你需要打开下 F12 调试下网页载入和刷新的情况。

Discourse 是使用 API 调用的方式，页面点一下其实调用的后面的 API 返回数据的。

这个情况我感觉有点像服务器的资源不够后端数据处理不过来的意思。

你机器现在是什么配置，每天网站的访问量有多少呢？

---

<div class="post-metadata">

**Author:** ![Ava](https://www.isharkfly.com/user_avatar/www.isharkfly.com/ava/32/15917_2.png) [@Ava](https://www.isharkfly.com/u/Ava)\
**Post date:** [December 2, 2024, 2:54pm UTC](https://www.isharkfly.com/t/topic/16695/3 "2024-12-02T14:54:00Z")

</div>

视频中演示是isharkfly，我的服务器也同样出现问题。

```plaintext
 CPU 型号 : AMD EPYC 9634 84-Core Processor
 CPU 核心数 : 4
 CPU 频率 : 2246.624 MHz
 CPU 缓存 : L1: 256.00 KB / L2: 2.00 MB / L3: 64.00 MB
 AES-NI指令集 : ✔ Enabled
 VM-x/AMD-V支持 : ❌ Disabled
 内存 : 8 GiB
 Swap : [no swap partition or swap file detected]

```

比如，打开准备评论，只要久一点，点发表，就卡着不动，但其实它已经发表成功了。

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [December 2, 2024, 3:04pm UTC](https://www.isharkfly.com/t/topic/16695/4 "2024-12-02T15:04:41Z")

</div>

挺奇怪的一个问题。

我在我电脑上录屏了一个操作。

貌似没有出现你的说的问题，回复上也没有出现卡顿的情况。

你的机器配置应该也够用了的。

另外，你用的是什么浏览器呀，我用的是 Firefox。

---

<div class="post-metadata">

**Author:** ![Ava](https://www.isharkfly.com/user_avatar/www.isharkfly.com/ava/32/15917_2.png) [@Ava](https://www.isharkfly.com/u/Ava)\
**Post date:** [December 2, 2024, 3:08pm UTC](https://www.isharkfly.com/t/topic/16695/5 "2024-12-02T15:08:49Z")

</div>

他出现是你放一个页面，然后放在一边去，凉 他一会，才会出现的，我的谷歌浏览最新版。

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [December 2, 2024, 3:13pm UTC](https://www.isharkfly.com/t/topic/16695/6 "2024-12-02T15:13:24Z")

</div>

好的我试试。

要凉多长时间？大概多少秒呢？

用 Chrome 调试了下网络载入的情况。

我们服务器在境外，前面套用了 Cloudflare，这感觉看起来有点像网络问题。

正常来说页面的载入时间在 1s 之内，同时页面的顶部还有一个载入滚动条，在滚动条上能看到载入时间。

这个可能只有管理员才有。

 ![2024-12-02_10-21-18](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/c/1/c1f586f6bb861e6c7411a4267c8e88acd3b9462f.jpeg)

我感觉有可能是在 API 调用的时候，服务器没有迅速返回需要的数据，当等一段时间后链接中断了，然后再点需要重新建立链接。

有点像 CF 的问题。

---

<div class="post-metadata">

**Author:** ![Ava](https://www.isharkfly.com/user_avatar/www.isharkfly.com/ava/32/15917_2.png) [@Ava](https://www.isharkfly.com/u/Ava)\
**Post date:** [December 2, 2024, 3:20pm UTC](https://www.isharkfly.com/t/topic/16695/7 "2024-12-02T15:20:46Z")

</div>

我也不懂，有几分钟，有时半小时以上都有，还是我isharkfly窗口开得太多了，

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [December 2, 2024, 3:28pm UTC](https://www.isharkfly.com/t/topic/16695/8 "2024-12-02T15:28:28Z")

</div>

> [@Ava](#):
>
> 有时半小时以上都有

这个问题感觉更像是网络问题。

有时候可能会出现资源不够或者网络重新链接的问题。

服务器上我们用的是 4G 的内存。

看了下 CPU 的利用率和内存，感觉也是保持在正常的情况。

 ![2024-12-02_10-27-33](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/8/0/80d5b3d4176cf6ea09dd2e4c6fe0bf9d75754ba8.jpeg)

貌似并没有出现过载。

---

<div class="post-metadata">

**Author:** ![Ava](https://www.isharkfly.com/user_avatar/www.isharkfly.com/ava/32/15917_2.png) [@Ava](https://www.isharkfly.com/u/Ava)\
**Post date:** [December 2, 2024, 3:33pm UTC](https://www.isharkfly.com/t/topic/16695/9 "2024-12-02T15:33:52Z")

</div>

![aa](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/c/4/c45c1a044313933f48971a15dffff48066192645.png)

刚才，上传都出错，可能是我的谷歌浏览器问题，我刷新都不行，后面我清空了谷歌浏览的数据，又能上传了。谢谢！

---

<div class="post-metadata">

**Author:** ![hex](https://www.isharkfly.com/user_avatar/www.isharkfly.com/hex/32/21953_2.png) [@hex](https://www.isharkfly.com/u/hex)\
**Post date:** [December 2, 2024, 3:38pm UTC](https://www.isharkfly.com/t/topic/16695/10 "2024-12-02T15:38:17Z")

</div>

> [@Ava](#):
>
> 谷歌浏览的数据

这个有可能是因为周末我们升级了一次。

升级的过程可能会导致 JS 调用的错误。

 ![2024-12-02_10-36-38](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/3X/7/3/73aa966c54b57f66cc9612636616e621e7959f09.jpeg)

你的浏览器中有 571 个 JS 错误，通常载入 Google 广告的话，有可能会出现一些错误。

但 571 个错误就太多了。

多是 JS 的互相调用或者缓存的问题。

---

<div class="post-metadata">

**Author:** ![Ava](https://www.isharkfly.com/user_avatar/www.isharkfly.com/ava/32/15917_2.png) [@Ava](https://www.isharkfly.com/u/Ava)\
**Post date:** [December 2, 2024, 5:23pm UTC](https://www.isharkfly.com/t/topic/16695/11 "2024-12-02T17:23:04Z")

</div>

是的，好奇怪，不懂如何优化的，我这边看其他的 discourse站，倒没有出现此情况，别人也是用cf。

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [December 2, 2024, 7:32pm UTC](https://www.isharkfly.com/t/topic/16695/12 "2024-12-02T19:32:19Z")

</div>

> [@Ava](#):
>
> 我这边看其他的 discourse站，倒没有出现此情况

这个问题有很多。

可能是网络问题，也可能是版本问题。

但能通过刷新缓存解决问题通常说明这个问题不大，多半是升级后的 JS 冲突。

这个在频繁升级的时候还是比较容易遇到的。

所以很多系统在 JS 编译后对会添加版本号，以避免这种情况。
