Describe the Bug
When performing a GET request on a table containing a large number of items and specifying a limit of -1 (meaning no limit), the application unexpectedly exits.
To prevent the application from loading more data than the system can handle, it would be useful to introduce an environment variable —such as MAX_FETCH_LIMIT— to define the maximum allowed limit value for both GET and POST operations.
If a request exceeds this configured maximum, the application should return a clear error instead of crashing.
Important: This new limit must not affect operations such as aggregate[countDistinct], which should continue to work normally without being constrained by this maximum limit.
To Reproduce
Prepare a table containing a very large number of items (e.g., several hundred thousand or more) with related table
Perform a GET request on this table with the parameter limit = -1 : GET /my-table?limit=-1
Notice that the application exits unexpectedly (crashes) during the request
Directus Version
v9.10.3.15
Hosting Strategy
Self-Hosted (Docker Image)
Describe the Bug
When performing a GET request on a table containing a large number of items and specifying a limit of -1 (meaning no limit), the application unexpectedly exits.
To prevent the application from loading more data than the system can handle, it would be useful to introduce an environment variable —such as MAX_FETCH_LIMIT— to define the maximum allowed limit value for both GET and POST operations.
If a request exceeds this configured maximum, the application should return a clear error instead of crashing.
Important: This new limit must not affect operations such as aggregate[countDistinct], which should continue to work normally without being constrained by this maximum limit.
To Reproduce
Prepare a table containing a very large number of items (e.g., several hundred thousand or more) with related table
Perform a GET request on this table with the parameter limit = -1 : GET /my-table?limit=-1
Notice that the application exits unexpectedly (crashes) during the request
Directus Version
v9.10.3.15
Hosting Strategy
Self-Hosted (Docker Image)