-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
上传附件或者主题报错,超过30秒 #3041
Comments
是否如提示一样等待了 30 s 呢?建议先看看浏览器控制台的异常。 可能和这个配置有关:https://uppy.io/docs/xhr-upload/#timeout-30-1000 /triage needs-information |
来信已收到,我会尽快回复。
|
是的,就是这个报错。请问我在哪里可以设置延长这个超时时间呢? |
@kingname 先看浏览器控制台的异常和后端的日志才能排查,这并不一定是上传超时了。 |
@ruibaby 在控制台看了,就是[uppy]报的30秒超时 |
可以截下图,顺便看看 Network 是否有发起上传请求。 |
上传附件会有这个问题吗? |
不再使用halo,本issue关闭。 |
此问题目前还没有得到原因和复现,建议保持打开的状态,以便后续使用者继续反馈的跟踪。 感谢 @kingname 的反馈。 /reopen |
@ruibaby: Reopened this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
我这里的环境是这样的:
|
建议先通过群晖访问 Halo 安装主题或者插件,看看是否会出现同样的错误。如果没有出现该错误,确认一下反向代理配置是否正确。 我刚刚又在本地通过 Docker 运行测试,仍然没有遇到 30s 超时的问题,测试命令如下: docker run \
-it -d \
--name halo \
-p 8090:8090 \
-v ~/.halo2:/root/.halo2 \
halohub/halo:2.0.2 \
--halo.external-url=http://localhost:8090/ \
--halo.security.initializer.superadminuser=admin \
--halo.security.initializer.superadminpassword=P@88w0rd 测试结果如下: |
halo-sigs/plugin-alioss#13 我也遇到过安装插件时发生超时错误 |
@longjuan 但 uppy 的文档说的是请求没有进度才会 timeout,所以怀疑还是因为请求还没有到达服务器,比如由于 Nginx 的大小限制。 我将研究一下如何触发 uppy 的这个异常。 |
直接在群晖上面使用IP访问的时候,可以正常上传。只有在用域名通过云服务器+nginx+frp转发的时候,才报错。 nginx已经设置过post请求体的大小和超时时间了。用域名访问的时候,除了上传文件,其他功能都是正常的。 |
@ruibaby 可以使用https://github.com/longjuan/halo-plugin-s3os/actions/runs/3829474290 这里的jar包,我通过Thread.sleep模拟上传文件到对象存储过慢 |
已经明白了导致这个问题的原因。是因为上传附件或者安装主题插件时,即便文件已经向服务器发送完毕,后端也会继续处理后续的逻辑,如果这个时间超过 uppy 组件设置的 timeout 时间,就会抛出异常(uppy 会检测是否有进度,请参考 https://github.com/transloadit/uppy/blob/83ac000c31bb8bcb806a22ef6a9e06f041e47d8a/packages/%40uppy/xhr-upload/src/index.js#L232-L259) 文件发送到服务器完毕之后会是 100%,这里的 100% 并不代表是服务端已经处理完毕,而是文件发送完毕。 题主的情况应该是上传到服务器之后还要经过 frp,可能是这个阶段的时间造成了这个问题。 可以在 uppy 取消这个 timeout 设置。 @longjuan 提供的测试方式非常容易复现,感谢。 |
/assign |
…ds (#813) <!-- Thanks for sending a pull request! Here are some tips for you: 1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。 1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>. 2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。 2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. 3. 请确保你已经添加并运行了适当的测试。 3. Ensure you have added or ran the appropriate tests for your PR. --> #### What type of PR is this? <!-- 添加其中一个类别: Add one of the following kinds: /kind bug /kind cleanup /kind documentation /kind feature /kind optimization 适当添加其中一个或多个类别(可选): Optionally add one or more of the following kinds if applicable: /kind api-change /kind deprecation /kind failing-test /kind flake /kind regression --> /kind improvement #### What this PR does / why we need it: Remove the timeout error prompt caused by the upload server processing for more than 30 seconds #### Which issue(s) this PR fixes: <!-- PR 合并时自动关闭 issue。 Automatically closes linked issue when PR is merged. 用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)` Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes halo-dev/halo#3041 #### Screenshots: <!-- 如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。 If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR. eg. Before: ![screenshot-before](https://user-images.githubusercontent.com/screenshot.png) After: ![screenshot-after](https://user-images.githubusercontent.com/screenshot.png) --> ![image](https://user-images.githubusercontent.com/28662535/210917239-b4b050f8-766f-4289-9ba2-ccb99bb6ac55.png) ![image](https://user-images.githubusercontent.com/28662535/210917273-c6291485-f420-4f02-a7c8-2b4b286110d4.png) #### Special notes for your reviewer: 测试: 上传大文件让后端处理过程超过30秒,观察是否报错 或使用[修改后的插件](https://github.com/longjuan/halo-plugin-s3os/actions/runs/3852075387)上传到对象存储,观察61秒后是否上传成功 #### Does this PR introduce a user-facing change? <!-- 如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。 否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change), Release Note 需要以 `action required` 开头。 If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note 去除上传文件处理时间超过30秒后的报错 ```
…ds (halo-dev/console#813) <!-- Thanks for sending a pull request! Here are some tips for you: 1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。 1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>. 2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。 2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. 3. 请确保你已经添加并运行了适当的测试。 3. Ensure you have added or ran the appropriate tests for your PR. --> #### What type of PR is this? <!-- 添加其中一个类别: Add one of the following kinds: /kind bug /kind cleanup /kind documentation /kind feature /kind optimization 适当添加其中一个或多个类别(可选): Optionally add one or more of the following kinds if applicable: /kind api-change /kind deprecation /kind failing-test /kind flake /kind regression --> /kind improvement #### What this PR does / why we need it: Remove the timeout error prompt caused by the upload server processing for more than 30 seconds #### Which issue(s) this PR fixes: <!-- PR 合并时自动关闭 issue。 Automatically closes linked issue when PR is merged. 用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)` Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> Fixes halo-dev#3041 #### Screenshots: <!-- 如果此 PR 有 UI 的改动,最好截图说明这个 PR 的改动。 If there are UI changes to this PR, it is best to take a screenshot to illustrate the changes to this PR. eg. Before: ![screenshot-before](https://user-images.githubusercontent.com/screenshot.png) After: ![screenshot-after](https://user-images.githubusercontent.com/screenshot.png) --> ![image](https://user-images.githubusercontent.com/28662535/210917239-b4b050f8-766f-4289-9ba2-ccb99bb6ac55.png) ![image](https://user-images.githubusercontent.com/28662535/210917273-c6291485-f420-4f02-a7c8-2b4b286110d4.png) #### Special notes for your reviewer: 测试: 上传大文件让后端处理过程超过30秒,观察是否报错 或使用[修改后的插件](https://github.com/longjuan/halo-plugin-s3os/actions/runs/3852075387)上传到对象存储,观察61秒后是否上传成功 #### Does this PR introduce a user-facing change? <!-- 如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。 否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change), Release Note 需要以 `action required` 开头。 If no, just write "NONE" in the release-note block below. If yes, a release note is required: Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required". --> ```release-note 去除上传文件处理时间超过30秒后的报错 ```
是什么版本出现了此问题?
2.0.2
使用的什么数据库?
MariaDB
使用的哪种方式部署?
Docker
在线站点地址
No response
发生了什么?
无论是上传附件还是上传主题,都会报图中所示的错误。
相关日志输出
No response
附加信息
The text was updated successfully, but these errors were encountered: