You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One quick optimization you can do for your app is removing pnpm start and using output: standalone or changing the command to ./node_modules/.bin/next start instead, that saves about 50MB in RSS
The output: 'standalone' docs say:
Next.js can automatically create a standalone folder that copies only the necessary files for a production deployment including select files in node_modules.
This will create a folder at .next/standalone which can then be deployed on its own without installing node_modules.
Additionally, a minimal server.js file is also output which can be used instead of next start. This minimal server does not copy the public or .next/static folders by default as these should ideally be handled by a CDN instead, although these folders can be copied to the standalone/public and standalone/.next/static folders manually, after which server.js file will serve these automatically.
The text was updated successfully, but these errors were encountered:
karlhorky
changed the title
Improve deployed memory footprint with different start commands
Reduce memory footprint with different start commands
Aug 10, 2023
From Tim Neutkens:
The
output: 'standalone'
docs say:The text was updated successfully, but these errors were encountered: