cloudflare / cloudflare/developer-platform

🐛 BUG: `504 Gateway Time-out` when applying migrations in D1

未关闭
#4 19 条评论 1 个 reaction 已指派 1 人 在 GitHub 查看

@lambrospetrou 已经在做这个了。

开始于 2025年3月3日。

awaiting-response:cloudflare needs-reproduction product:d1
主要语言
没有语言数据
星标
1
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

Which Cloudflare product(s) does this pertain to?

D1

What versions are you using?

3.102.0 [Wrangler], 20.18.0 [Node.js]

What operating system and version are you using?

Mac Sequoia 15.2

Please provide a link to a minimal reproduction

No response

Describe the Bug

I get the following error message when I apply a migration:

✘ [ERROR] Migration 0043_cultured_the_stranger.sql failed with the following errors:
  
  
  
  ✘ [ERROR] <html>
  
  
    <head><title>504 Gateway Time-out</title></head>
    <body>
    <center><h1>504 Gateway Time-out</... (length = 168)
    POST /accounts/***/d1/database/<DATABASE_ID>/query -> 504 Gateway Time-out

The migration SQL commands:

ALTER TABLE `app_devices` DROP COLUMN `force_app_bundle_id`;
ALTER TABLE `app_devices` DROP COLUMN `force_app_channel_id`;
Please provide any relevant error logs
Wrangler Logs
--- 2025-01-15T14:25:18.408Z debug
🪵  Writing logs to "/Users/robingenz/Library/Preferences/.wrangler/logs/wrangler-2025-01-15_14-25-18_336.log"
---

--- 2025-01-15T14:25:18.408Z debug
Metrics dispatcher: Dispatching disabled - would have sent {"deviceId":"<DEVICE_ID>","event":"wrangler command started","timestamp":1736951118408,"properties":{"amplitude_session_id":1736951118407,"amplitude_event_id":0,"wranglerVersion":"3.102.0","osPlatform":"Mac OS","osVersion":"Darwin Kernel Version 24.2.0: Fri Dec  6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000","nodeVersion":20,"packageManager":"npm","isFirstUsage":false,"configFileType":"toml","isCI":false,"isPagesCI":false,"isWorkersCI":false,"isInteractive":true,"hasAssets":false,"argsUsed":["remote"],"argsCombination":"remote","command":"wrangler d1 migrations apply","args":{"remote":true,"xJsonConfig":true,"j":true,"preview":false,"database":"<REDACTED>"}}}.
---

--- 2025-01-15T14:25:18.410Z debug
.env file not found at ".env". Continuing... For more details, refer to https://developers.cloudflare.com/workers/wrangler/system-environment-variables/
---

--- 2025-01-15T14:25:18.413Z debug
No experimental flag store instantiated
---

--- 2025-01-15T14:25:18.413Z debug
Attempted to use flag "RESOURCES_PROVISION" which has not been instantiated
---

--- 2025-01-15T14:25:18.413Z debug
No experimental flag store instantiated
---

--- 2025-01-15T14:25:18.413Z debug
Attempted to use flag "RESOURCES_PROVISION" which has not been instantiated
---

--- 2025-01-15T14:25:18.436Z warn
▲ [WARNING] Processing wrangler.toml configuration:

    - "unsafe" fields are experimental and may change or break at any time.


---

--- 2025-01-15T14:25:20.687Z log

 ⛅️ wrangler 3.102.0
--------------------

---

--- 2025-01-15T14:25:20.688Z debug
Checking if domain has Access enabled: dash.cloudflare.com
---

--- 2025-01-15T14:25:20.688Z debug
Access switch not cached for: dash.cloudflare.com
---

--- 2025-01-15T14:25:20.796Z debug
Caching access switch for: dash.cloudflare.com
---

--- 2025-01-15T14:25:21.361Z log
🌀 Executing on preview database <DATABASE_NAME> (<DATABASE_ID>):
---

--- 2025-01-15T14:25:21.361Z log
🌀 To execute on your local development database, remove the --remote flag from your wrangler command.
---

--- 2025-01-15T14:25:21.362Z debug
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/d1/database/<DATABASE_ID>/query
---

--- 2025-01-15T14:25:21.362Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:21.362Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:21.362Z debug
-- END CF API REQUEST
---

--- 2025-01-15T14:25:24.311Z debug
-- START CF API RESPONSE: OK 200
---

--- 2025-01-15T14:25:24.312Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:24.312Z debug
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:24.312Z debug
-- END CF API RESPONSE
---

--- 2025-01-15T14:25:24.312Z log
🚣 Executed 1 command in 0.2813ms
---

--- 2025-01-15T14:25:24.312Z log
🌀 Executing on preview database <DATABASE_NAME> (<DATABASE_ID>):
---

--- 2025-01-15T14:25:24.312Z log
🌀 To execute on your local development database, remove the --remote flag from your wrangler command.
---

--- 2025-01-15T14:25:24.312Z debug
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/d1/database/<DATABASE_ID>/query
---

--- 2025-01-15T14:25:24.312Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:24.313Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:24.313Z debug
-- END CF API REQUEST
---

--- 2025-01-15T14:25:25.985Z debug
-- START CF API RESPONSE: OK 200
---

--- 2025-01-15T14:25:25.986Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:25.986Z debug
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:25.986Z debug
-- END CF API RESPONSE
---

--- 2025-01-15T14:25:25.986Z log
🚣 Executed 1 command in 0.6588ms
---

--- 2025-01-15T14:25:25.989Z log
Migrations to be applied:
---

--- 2025-01-15T14:25:25.998Z log
┌────────────────────────────────┐
│ name                           │
├────────────────────────────────┤
│ 0043_cultured_the_stranger.sql │
└────────────────────────────────┘
---

--- 2025-01-15T14:25:35.114Z debug
-- START CF API REQUEST: GET https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/d1/database/<DATABASE_ID>
---

--- 2025-01-15T14:25:35.114Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:35.114Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:35.114Z debug
-- END CF API REQUEST
---

--- 2025-01-15T14:25:36.932Z debug
-- START CF API RESPONSE: OK 200
---

--- 2025-01-15T14:25:36.932Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:36.932Z debug
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:36.932Z debug
-- END CF API RESPONSE
---

--- 2025-01-15T14:25:36.934Z log
🌀 Executing on preview database <DATABASE_NAME> (<DATABASE_ID>):
---

--- 2025-01-15T14:25:36.934Z log
🌀 To execute on your local development database, remove the --remote flag from your wrangler command.
---

--- 2025-01-15T14:25:36.934Z debug
-- START CF API REQUEST: POST https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/d1/database/<DATABASE_ID>/query
---

--- 2025-01-15T14:25:36.934Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:36.934Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2025-01-15T14:25:36.934Z debug
-- END CF API REQUEST
---

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。