From 93b43c6dbf7fef6f239dbcfba1e24ae141d82c05 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Fri, 17 Oct 2025 18:21:20 +0200 Subject: [PATCH 1/8] docs: add max import error --- content/configuration/1.general.md | 1 + content/guides/02.content/4.import-export.md | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/content/configuration/1.general.md b/content/configuration/1.general.md index e396bc91..12becd83 100644 --- a/content/configuration/1.general.md +++ b/content/configuration/1.general.md @@ -20,6 +20,7 @@ description: Configuration for the general system, server, first admin user, and | `GRAPHQL_SCHEMA_GENERATION_MAX_CONCURRENT` | How many GraphQL schemas can be generated simultaneously. | `5` | | `ROBOTS_TXT` | What the `/robots.txt` endpoint should return. | `User-agent: *\nDisallow: /` | | `TEMP_PATH` | Where Directus' temporary files should be managed. | `./node_modules/.directus` | +| `MAX_IMPORT_ERRORS` | Maximum number of errors to collect during CSV/JSON import operations before stopping the import. Prevents memory issues on large imports with many errors. | `1000` | | `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | diff --git a/content/guides/02.content/4.import-export.md b/content/guides/02.content/4.import-export.md index 0e94a54b..1f45bfe1 100644 --- a/content/guides/02.content/4.import-export.md +++ b/content/guides/02.content/4.import-export.md @@ -25,6 +25,11 @@ It is possible to import relational field values as well. For this task, the use permissions for the related collection. :: +::callout{icon="material-symbols:info-outline"} +**Import Error Handling** +During import operations, validation errors (field validation, database constraints, etc.) are collected up to a maximum limit. Once the `MAX_IMPORT_ERRORS` environment variable limit is reached, the import stops and returns all collected errors. +:: + ## Export Items ![Export items](/img/6253cd72-005d-4551-b3fd-72acd33e47f6.webp) From cac40ca4b17496f4ca0bb29ed8e6d4e3835be0d9 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 15:07:01 +0200 Subject: [PATCH 2/8] Update content/configuration/1.general.md Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> --- content/configuration/1.general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/configuration/1.general.md b/content/configuration/1.general.md index 12becd83..46430f0d 100644 --- a/content/configuration/1.general.md +++ b/content/configuration/1.general.md @@ -20,7 +20,7 @@ description: Configuration for the general system, server, first admin user, and | `GRAPHQL_SCHEMA_GENERATION_MAX_CONCURRENT` | How many GraphQL schemas can be generated simultaneously. | `5` | | `ROBOTS_TXT` | What the `/robots.txt` endpoint should return. | `User-agent: *\nDisallow: /` | | `TEMP_PATH` | Where Directus' temporary files should be managed. | `./node_modules/.directus` | -| `MAX_IMPORT_ERRORS` | Maximum number of errors to collect during CSV/JSON import operations before stopping the import. Prevents memory issues on large imports with many errors. | `1000` | +| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled. | `1000` | | `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | From 3eda6e27d7d7de6ecb34e85324c4cfe9adb602cb Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 15:10:20 +0200 Subject: [PATCH 3/8] fix: handle feedback --- content/configuration/1.general.md | 2 -- content/configuration/security-limits.md | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/configuration/1.general.md b/content/configuration/1.general.md index 46430f0d..6efa2248 100644 --- a/content/configuration/1.general.md +++ b/content/configuration/1.general.md @@ -20,8 +20,6 @@ description: Configuration for the general system, server, first admin user, and | `GRAPHQL_SCHEMA_GENERATION_MAX_CONCURRENT` | How many GraphQL schemas can be generated simultaneously. | `5` | | `ROBOTS_TXT` | What the `/robots.txt` endpoint should return. | `User-agent: *\nDisallow: /` | | `TEMP_PATH` | Where Directus' temporary files should be managed. | `./node_modules/.directus` | -| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled. | `1000` | -| `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | ## Server diff --git a/content/configuration/security-limits.md b/content/configuration/security-limits.md index 3da53ba5..4c4f556e 100644 --- a/content/configuration/security-limits.md +++ b/content/configuration/security-limits.md @@ -129,3 +129,5 @@ Allows you to configure hard technical limits, to prevent abuse and optimize for | `QUERY_LIMIT_DEFAULT` | The default query limit used when not defined in the API request. | `100` | | `QUERY_LIMIT_MAX` | The maximum query limit accepted on API requests. | `-1` | | `QUERYSTRING_MAX_PARSE_DEPTH ` | The maximum object depth when parsing URL query parameters using the querystring format | `10` | +| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled. | `1000` | +| `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | \ No newline at end of file From da5683d48861ba1fcf64f97c26e790c969418061 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 15:30:31 +0200 Subject: [PATCH 4/8] fix: restore remove line --- content/configuration/1.general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/configuration/1.general.md b/content/configuration/1.general.md index 6efa2248..0fa7fd5b 100644 --- a/content/configuration/1.general.md +++ b/content/configuration/1.general.md @@ -20,7 +20,7 @@ description: Configuration for the general system, server, first admin user, and | `GRAPHQL_SCHEMA_GENERATION_MAX_CONCURRENT` | How many GraphQL schemas can be generated simultaneously. | `5` | | `ROBOTS_TXT` | What the `/robots.txt` endpoint should return. | `User-agent: *\nDisallow: /` | | `TEMP_PATH` | Where Directus' temporary files should be managed. | `./node_modules/.directus` | - +| `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | ## Server From d438f14901d2fbaff70732aec0fb2fdfad3105d2 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 15:31:36 +0200 Subject: [PATCH 5/8] fix: restore removed line --- content/configuration/1.general.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/configuration/1.general.md b/content/configuration/1.general.md index 0fa7fd5b..e396bc91 100644 --- a/content/configuration/1.general.md +++ b/content/configuration/1.general.md @@ -22,6 +22,7 @@ description: Configuration for the general system, server, first admin user, and | `TEMP_PATH` | Where Directus' temporary files should be managed. | `./node_modules/.directus` | | `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | + ## Server | Variable | Description | Default Value | From 754deba619da11308ae75215b7b20883fae63208 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 20:54:42 +0200 Subject: [PATCH 6/8] Apply suggestion from @ComfortablyCoding Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> --- content/guides/02.content/4.import-export.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/guides/02.content/4.import-export.md b/content/guides/02.content/4.import-export.md index 1f45bfe1..995fdacd 100644 --- a/content/guides/02.content/4.import-export.md +++ b/content/guides/02.content/4.import-export.md @@ -27,7 +27,7 @@ permissions for the related collection. ::callout{icon="material-symbols:info-outline"} **Import Error Handling** -During import operations, validation errors (field validation, database constraints, etc.) are collected up to a maximum limit. Once the `MAX_IMPORT_ERRORS` environment variable limit is reached, the import stops and returns all collected errors. +During import operations, errors are collected up to the maximum defined by [`MAX_IMPORT_ERRORS`](content/configuration/security-limits.md), after which the import is cancelled. :: ## Export Items From 2d5f458929591e789dc04ce2a75722f8faff8b33 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 20:56:46 +0200 Subject: [PATCH 7/8] Apply suggestion from @ComfortablyCoding Co-authored-by: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> --- content/configuration/security-limits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/configuration/security-limits.md b/content/configuration/security-limits.md index 73214ad3..26493796 100644 --- a/content/configuration/security-limits.md +++ b/content/configuration/security-limits.md @@ -130,5 +130,5 @@ Allows you to configure hard technical limits, to prevent abuse and optimize for | `QUERY_LIMIT_DEFAULT` | The default query limit used when not defined in the API request. | `100` | | `QUERY_LIMIT_MAX` | The maximum query limit accepted on API requests. | `-1` | | `QUERYSTRING_MAX_PARSE_DEPTH ` | The maximum object depth when parsing URL query parameters using the querystring format | `10` | -| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled. | `1000` | +| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled and the errors returned. | `1000` | | `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | \ No newline at end of file From 58e5916d4f812628a25560915813116786d9c402 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 20 Oct 2025 20:57:42 +0200 Subject: [PATCH 8/8] fix: clean up wrong line --- content/configuration/security-limits.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/configuration/security-limits.md b/content/configuration/security-limits.md index 26493796..36d95c5a 100644 --- a/content/configuration/security-limits.md +++ b/content/configuration/security-limits.md @@ -130,5 +130,4 @@ Allows you to configure hard technical limits, to prevent abuse and optimize for | `QUERY_LIMIT_DEFAULT` | The default query limit used when not defined in the API request. | `100` | | `QUERY_LIMIT_MAX` | The maximum query limit accepted on API requests. | `-1` | | `QUERYSTRING_MAX_PARSE_DEPTH ` | The maximum object depth when parsing URL query parameters using the querystring format | `10` | -| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled and the errors returned. | `1000` | -| `ACCEPT_TERMS` | Confirm acknowledgement of the [Directus BSL License 1.1](https://directus.io/bsl) and disable the license welcome banner. | `false` | \ No newline at end of file +| `MAX_IMPORT_ERRORS` | The maximum number of errors permitted while importing records before the process is cancelled and the errors returned. | `1000` | \ No newline at end of file