Next.js Discord

Discord Forum

experimental-generate hangs indefinitely in >= 13.4.13 (including 14)

Unanswered
Silver posted this in #help-forum
Open in Discord
SilverOP
The new experimental-compile / experimental-generate steps are very useful for container deployment, where much of the specific environment is either not available or will differ at runtime.

I noticed that experimental-generate never exits starting with next 13.4.13 however. It does seem to complete its work, as it prints the status to the console, and then writes output about the completion of next-build to .next/trace. Up to that point the behavior is similar to 13.4.12, but while .12 then exits as expected, >= .13 just hangs.

I have tried this in separate, unrelated projects with consistent results. 13.4.12 works, but so far in every case, it hangs with >= 13.4.13, even with a "Hello, World" project.

The remaining activity is not terribly instructive, it is just epolling. Any thoughts?

Note: I also tried node 20 with the same results.

[pid 70991] epoll_wait(13, [], 1024, 0) = 0
 > /usr/lib/x86_64-linux-gnu/libc.so.6(epoll_wait+0x5e) [0x12601e]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(uv__io_poll+0x833) [0x127b873]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(uv_run+0x14e) [0x12698fe]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(node::SpinEventLoop(node::Environment*)+0x14d) [0x6c5a6d]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(node::NodeMainInstance::Run()+0xf4) [0x7ca984]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*)+0xb8) [0x740648]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(node::Start(int, char**)+0x2ef) [0x74410f]
 > /usr/lib/x86_64-linux-gnu/libc.so.6(__libc_init_first+0x90) [0x29d90]
 > /usr/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x29e40]
 > /home/telackey/.nvm/versions/node/v18.18.2/bin/node(_start+0x2e) [0x6c1f4e]

6 Replies

SilverOP
I attached in a debugger, and I see that it has started up an http-server that is in the listening state. Not sure why, but it seems like this not being properly cleaned up.
SilverOP
Hmm, the incremental-cache-server looks like the likely culprit.
SilverOP
Yes, definitely is.
SilverOP
I'll work up a PR...
SilverOP
Actually, it is worked around by this https://github.com/vercel/next.js/pull/57943
SilverOP