thegeeklab / hugo-geekdoc

Hugo theme made for documentation

Home Page:https://geekdocs.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generating website fails if timeout is not increased - is this expected?

xoxys opened this issue · comments

Discussed in #813

Originally posted by herzbube April 5, 2024
I have a modest documentation site consisting of roughly 40 markdown and 100 image/movie files. Almost every markdown file has a table of contents, and there are many cross-references using the relref shortcode. If you want to inspect the content files, then you can find them here: https://github.com/herzbube/littlego-usermanual/tree/main/littlego-usermanual

I have incrementally worked on the site over several weeks, always previewing my work with hugo server and sometimes making an actual site build, but never deleting the resources folder. Today it occurred to me to delete the resources folder before making a build. To my dismay the build suddenly failed with several messages indicating a potential "infinite recursion" problem. This was the actual output (paths obfuscated):

$ rm -rf resources public/online; hugo --config=config/online/hugo.toml --destination public/online
Start building sites … 
hugo v0.124.1-db083b05f16c945fec04f745f0ca8640560cf1ec+extended darwin/amd64 BuildDate=2024-03-20T11:40:10Z VendorInfo=brew

ERROR render of "taxonomy" failed: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/_default/baseof.html:40:15": execute of template failed: template: _default/terms.html:40:15: executing "_default/terms.html" at <partial "menu" .>: error calling partial: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/partials/menu.html:10:9": execute of template failed: template: partials/menu.html:10:9: executing "partials/menu.html" at <partial "menu-filetree" .>: error calling partial: partial "menu-filetree" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
ERROR render of "page" failed: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/_default/baseof.html:40:15": execute of template failed: template: _default/single.html:40:15: executing "_default/single.html" at <partial "menu" .>: error calling partial: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/partials/menu.html:10:9": execute of template failed: template: partials/menu.html:10:9: executing "partials/menu.html" at <partial "menu-filetree" .>: error calling partial: partial "menu-filetree" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
ERROR render of "section" failed: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/_default/baseof.html:40:15": execute of template failed: template: _default/list.html:40:15: executing "_default/list.html" at <partial "menu" .>: error calling partial: partial "menu" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
ERROR render of "section" failed: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/_default/baseof.html:40:15": execute of template failed: template: _default/list.html:40:15: executing "_default/list.html" at <partial "menu" .>: error calling partial: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/partials/menu.html:10:9": execute of template failed: template: partials/menu.html:10:9: executing "partials/menu.html" at <partial "menu-filetree" .>: error calling partial: partial "menu-filetree" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.
Total in 71354 ms
Error: error building site: render: failed to render pages: render of "page" failed: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/_default/baseof.html:40:15": execute of template failed: template: _default/single.html:40:15: executing "_default/single.html" at <partial "menu" .>: error calling partial: "/path/to/littlego-usermanual/themes/hugo-geekdoc/layouts/partials/menu.html:10:9": execute of template failed: template: partials/menu.html:10:9: executing "partials/menu.html" at <partial "menu-filetree" .>: error calling partial: partial "menu-filetree" timed out after 30s. This is most likely due to infinite recursion. If this is just a slow template, you can try to increase the 'timeout' config setting.

Seeing that the build took 71354 ms, I added this line to hugo.toml:

timeout = '80s'

and re-ran the site build (again removing the resources folder first). This time the build worked without error.

So my question is: Is it expected that Hugo builds with the Geekdoc theme take such a long time? If not, then do you have any ideas what I could be doing wrong?