cloudflare / cloudflare/developer-platform

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

Abierto
#4 19 comentarios 1 reacción 1 asignado Reclamado por @lambrospetrou Ver en GitHub
awaiting-response:cloudflare needs-reproduction product:d1
Lenguaje dominante
Sin datos de lenguaje
Estrellas
1
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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]


504 Gateway Time-out

504 Gateway Time-out/query -> 504 Gateway Time-out
```

The migration SQL commands:

```sql
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":"","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":""}}}.
---

--- 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 ():
---

--- 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//d1/database//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 ():
---

--- 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//d1/database//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//d1/database/
---

--- 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 ():
---

--- 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//d1/database//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
---
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.