Problem
All endpoints (including /swagger and /api) return a 504 Gateway Timeout error when deployed to my Vercel project, despite working on a different account with the same configuration.
Current Behavior
- All endpoints return a 504 Gateway Timeout error.
- Secure connect bundle is provided via
ASTRA_SECURE_BUNDLE_B64environment variable and extracted at runtime. - Initialization logs show the bundle is decoded as expected on cold start, but the request still times out.
- The exact same code and identical environment variables work perfectly when deployed to a colleague’s Vercel account.
Expected Behavior
Endpoints should return successful responses immediately (as they do on the colleague’s Vercel project) without 504 errors.
Steps to Reproduce
- Clone repo: https://github.com/swisscdn/FiatExServer
- Set Vercel environment variables including valid Astra and DB secrets:
ASTRA_DB_APPLICATION_TOKENASTRA_DB_IDDATABASE_KEYSPACEDATABASE_REGIONASTRA_SECURE_BUNDLE_B64(the base64-encoded secure-connect zip)
- Deploy on Vercel (Go serverless function).
- Open
/,/swagger,/user/...etc.
Result: All requests return 504. Logs show bundle extraction occurs at cold start, but then no further request logs appear before timeout.
Environment and Init
// Reads ASTRA_SECURE_BUNDLE_B64, decodes to /tmp/secure-connect.zip if needed, then inits DB client.
bundleBase64 := os.Getenv("ASTRA_SECURE_BUNDLE_B64")
// ...decode, write to /tmp if missing...
client, err := astra.NewStaticTokenClient(
token,
astra.WithSecureConnectBundle("/tmp/secure-connect.zip"),
// ...
)
vercel.json
{
"functions": {
"api/**": {
"runtime": "go",
"includeFiles": "secure-connect-openfiat-test.zip"
}
},
"rewrites": [
{ "source": "/swagger/(.*)", "destination": "/api/root" },
{ "source": "/", "destination": "/api/root" },
{ "source": "/user/(.*)", "destination": "/api/user" }
]
}
What I’ve Tried
Verified all env variables & settings match colleague’s working setup
Cleared and reuploaded bundle base64 string
Redeployed both mainand preview branches
Added debug logging; no errors visible, but handler never executes before timeout
Exact same code and settings deployed to colleague’s Vercel account works perfectly