Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I’ve implemented getStaticProps for my next.js application which works perfectly locally, but fails on the app platform. The build will hang indefinitely on “pool.query” to the connected database when creating the static images, and will be killed and rebuilt 3 times before failing.
After a lot of testing, I’ve discovered my build works on the app platform when it’s connected to a 3rd party database. I don’t understand why this is the case as my current build on the app platform and my local build can use the connected db.
import { FusionDex } from "../components/components";
import { wrapper, addInitialStore } from "../store/store";
import getInitialStore from "./api/initialStore";
export default function Home() {
return <>
<FusionDex />
</>
}
export const getStaticProps = wrapper.getStaticProps(store => async (props) => {
try {
let initialStore = await getInitialStore();
store.dispatch(addInitialStore(initialStore));
} catch (error) {
console.error('Error executing database query:', error);
}
})
[2023-10-06 20:53:57] │ Static worker unexpectedly exited with code: null and signal: SIGTERM
[2023-10-06 20:53:57] │
[2023-10-06 20:53:57] │ > Build error occurred
[2023-10-06 20:53:57] │ Error: Static page generation for / is still timing out after 3 attempts. See more info here https://nextjs.org/docs/messages/static-page-generation-timeout
[2023-10-06 20:53:57] │ at onRestart (/workspace/node_modules/next/dist/build/index.js:678:39)
[2023-10-06 20:53:57] │ at Worker.exportPage (/workspace/node_modules/next/dist/lib/worker.js:95:40)
[2023-10-06 20:53:57] │ at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-10-06 20:53:57] │ at async /workspace/node_modules/next/dist/export/index.js:522:32
[2023-10-06 20:53:57] │ at async Span.traceAsyncFn (/workspace/node_modules/next/dist/trace/trace.js:105:20)
[2023-10-06 20:53:57] │ at async Promise.all (index 2)
[2023-10-06 20:53:57] │ at async /workspace/node_modules/next/dist/export/index.js:512:9
[2023-10-06 20:53:57] │ at async Span.traceAsyncFn (/workspace/node_modules/next/dist/trace/trace.js:105:20)
[2023-10-06 20:53:57] │ at async /workspace/node_modules/next/dist/build/index.js:1303:21
[2023-10-06 20:53:57] │ at async Span.traceAsyncFn (/workspace/node_modules/next/dist/trace/trace.js:105:20)
[2023-10-06 20:53:57] │ building: exit status 1
[2023-10-06 20:53:57] │ ERROR: failed to build: exit status 1
dolphinnn
Vaishnavi Vundyala
016512ea60864da0867e5280f293de
Peter Monadjemi
Prince7hakur
devjk1
fc9acbfbc3124cbf8df28a1c5c5cdb
ab871885551143798f41908c709271
gouskova
Saivion Services
Marin
182d09356ab94d3893ddfaca4f0270