From dfa55f9c461b1c1fd1f51b32b23e60a2cc04f0c4 Mon Sep 17 00:00:00 2001 From: Leonard Martin Date: Mon, 29 Nov 2021 10:44:05 +0000 Subject: [PATCH 1/2] Add note to docs about `sharp` memory usage on default Linux setup It's fairly opaque to the user that there are problems with `sharp` in an out-of-the-box Linux environment, and so if `sharp` is going to be explicitly recommended for non-Vercel production environments then I think it's a good idea to make sure people are aware of the possible issues. My vanilla Heroku deployment was using wild amounts of memory until I found the details in the sharp docs about how to configure the memory allocator, so signposting this a bit better should help prevent issues in future. --- docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment.md b/docs/deployment.md index 794563d9115a2..7074f1eeea516 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -76,7 +76,7 @@ Next.js can be deployed to any hosting provider that supports Node.js. Make sure `next build` builds the production application in the `.next` folder. After building, `next start` starts a Node.js server that supports [hybrid pages](/docs/basic-features/pages.md), serving both statically generated and server-side rendered pages. -If you are using [`next/image`](/docs/basic-features/image-optimization.md), consider adding `sharp` for more performant [Image Optimization](/docs/basic-features/image-optimization.md) in your production environment by running `npm install sharp` in your project directory. +If you are using [`next/image`](/docs/basic-features/image-optimization.md), consider adding `sharp` for more performant [Image Optimization](/docs/basic-features/image-optimization.md) in your production environment by running `npm install sharp` in your project directory. Note that on Linux platforms sharp may require [some additional configuration](https://sharp.pixelplumbing.com/install#linux-memory-allocator) to prevent excessive memory usage. ### Docker Image From 8c5a1507d3935f0606d260273a7aa0ceefe81009 Mon Sep 17 00:00:00 2001 From: Lee Robinson Date: Mon, 29 Nov 2021 08:25:16 -0500 Subject: [PATCH 2/2] Update docs/deployment.md --- docs/deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/deployment.md b/docs/deployment.md index 7074f1eeea516..91d806aa3881a 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -76,7 +76,7 @@ Next.js can be deployed to any hosting provider that supports Node.js. Make sure `next build` builds the production application in the `.next` folder. After building, `next start` starts a Node.js server that supports [hybrid pages](/docs/basic-features/pages.md), serving both statically generated and server-side rendered pages. -If you are using [`next/image`](/docs/basic-features/image-optimization.md), consider adding `sharp` for more performant [Image Optimization](/docs/basic-features/image-optimization.md) in your production environment by running `npm install sharp` in your project directory. Note that on Linux platforms sharp may require [some additional configuration](https://sharp.pixelplumbing.com/install#linux-memory-allocator) to prevent excessive memory usage. +If you are using [`next/image`](/docs/basic-features/image-optimization.md), consider adding `sharp` for more performant [Image Optimization](/docs/basic-features/image-optimization.md) in your production environment by running `npm install sharp` in your project directory. On Linux platforms, `sharp` may require [additional configuration](https://sharp.pixelplumbing.com/install#linux-memory-allocator) to prevent excessive memory usage. ### Docker Image