-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion failed: len < MAX_ENV_VAR_LENGTH #23
Comments
serverMiddleware serialization will cause generate workers to fail. |
v2.7.0 includes a beforeWorkers hook you can use to exclude keys |
how many urls can nuxt-generate-cluster process at a time? breaks over 700 for me |
@lxsedov Are you on Windows? The limit talked about in this issue is caused by the nuxt.config that is passed from the master to worker. If your nuxt.config is big then you could experience this issue. The solution is to use the beforeWorkers hook to remove properties from your nuxt.config that the workers dont need. See the docs |
@pimlie on Windows it dies with 700 URLs, on Ubuntu after 5000. Is there a way to bypass the limitation of env var size? beforeWorkers doesn't really help when you need to use nuxt-generate for large amount of dynamic URLs. |
@lxsedov Are you listing 5000 urls directly in your nuxt.config's generate.routes? If so, you can remove that property in beforeWorkers, the workers dont need that. The master needs it and uses it to distribute smaller route chunks to workers. |
basically i want to generate 2-3M pages based on dynamic routes; removing routes in beforeWorkers helped but now I get 'No routes so not starting workers' passing 125000 routes |
@lxsedov Could you please share your full nuxt config? If thats not possible, at least the generate part? |
https://github.com/lxsedov/test/blob/master/nuxt-config.js; tried with completely fresh project no modules no plugins, passing 150k dynamic routes it fails with 'No routes so not starting workers'; win10 node10.16.0 |
Maybe try to clone the |
It exits with 'No routes...' even before getting to 'beforeWorkers' |
The master sends the nuxt.config through an env var to the worker. On windows there appears to be a limit of passing env vars of 32KB (possibly since node v12.10), if you exceed that limit libuv will throw an error.
Possible fixes:
The text was updated successfully, but these errors were encountered: