Will multiple baseof.html cause timeout

Will multiple baseof.html cause timeout

The following baseofs have introduced the same style sheet page. Sometimes, when running hugo-server, an error will be reported and timed out. Is it because of repeated construction of the style sheet? partialCached doesn’t solve the problem either.

{{ partial "stylesheet" . }}

site/layouts/_default/baseof.html
site/layouts/demo/baseof.html
site/layouts/posts/baseof.html
"D:\Program Files\nodejs\npm.cmd" run hugo-server:development

> jzeg-net@0.0.1 hugo-server:development       
> hugo server -e development --gc --watch --log

Start building sites … 
hugo v0.113.0-085c1b3d614e23d218ebf9daad909deaa2390c9a+extended windows/amd64 BuildDate=2023-06-05T15:04:51Z VendorInfo=gohugoio
WARN 2023/06/17 13:57:43 .File.Path on zero object. Wrap it in if or with: {{ with .File }}{{ .Path }}{{ end }}
ERROR 2023/06/17 13:57:43 render of "page" failed: "F:\PhpstormProjects\GitHub\jzeg-net.github.io\site\layouts\_default\baseof.html:27:7": execute of template failed: template: chatgpt/single.html:27:7: executing "chatgpt/single.h
tml" at <partial "stylesheet" .>: error calling partial: partial "stylesheet" 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 settin
g.
ERROR 2023/06/17 13:57:43 render of "page" failed: "F:\PhpstormProjects\GitHub\jzeg-net.github.io\site\layouts\_default\baseof.html:27:7": execute of template failed: template: about/single.html:27:7: executing "about/single.html"
 at <partial "stylesheet" .>: error calling partial: partial "stylesheet" 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 2023/06/17 13:57:43 render of "page" failed: "F:\PhpstormProjects\GitHub\jzeg-net.github.io\site\layouts\_default\baseof.html:27:7": execute of template failed: template: contact/single.html:27:7: executing "contact/single.h
tml" at <partial "stylesheet" .>: error calling partial: partial "stylesheet" 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 settin
g.
Built in 41853 ms
Error: error building site: render: failed to render pages: render of "page" failed: "F:\PhpstormProjects\GitHub\jzeg-net.github.io\site\layouts\_default\baseof.html:27:7": execute of template failed: template: ad/single.html:27:7
: executing "ad/single.html" at <partial "stylesheet" .>: error calling partial: partial "stylesheet" 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.

进程已结束,退出代码1



First, in v0.1113.0, this…

can be reduced to:

hugo server --gc

Second, in v0.114.0 (the next release), do this to enable logging:

hugo server --gc --logLevel=xxxx  # debug, info, warn, or error

Finally, when running hugo server with hugo server --gc against a project with multiple baseof.html templates (one per section), I am unable to reproduce the error that you reported. I restarted the server 100 times, and made 100 changes during one server run.

Each baseof.html template calls partials/css.html, which tranpiles Bootstrap’s Sass files to CSS using the Dart Sass transpiler.

I think you will need to share your project repository if you need further assistance.

Thank you for your information, very pleased.

Regarding the problem, the first thing to say is this timeout problem, which has never happened in the action of GitHub, so I feel that it is likely to be caused by the configuration problem of my local machine.

If you have spare time sometime in the future, you can give it a try. I don’t mind sharing repositories myself, I am learning to use some code of Hugo.

First of all, I use the wrapper in node. Maybe our environment is different, so the same problem has not been reproduced 100 times.
Secondly, my environment here is under the win environment. And some of my code logic may have problems or may delay time. In short, I still want to know the specific reason. Although the problem can be solved by increasing the timeout setting.

The following is the address of the repository. I usually run it locally through the command on line 21.

https://github.com/jzeg-net/jzeg-net.github.io/

Unable to reproduce with v0.114.0 on Linux.

Clone, install dependencies, and run
git clone --recurse-submodules https://github.com/jzeg-net/jzeg-net.github.io
cd jzeg-net.github.io/
npm ci
npm run hugo-server:development

Console log
> jzeg-net@0.0.1 hugo-server:development
> hugo server -e development --gc --watch --log

Start building sites … 
hugo v0.113.0-085c1b3d614e23d218ebf9daad909deaa2390c9a+extended linux/amd64 BuildDate=2023-06-05T15:04:51Z VendorInfo=gohugoio
WARN 2023/06/19 16:16:53 .File.Path on zero object. Wrap it in if or with: {{ with .File }}{{ .Path }}{{ end }}

                   | ZH-CN | EN-US  
-------------------+-------+--------
  Pages            |    72 |    71  
  Paginator pages  |     0 |     0  
  Non-page files   |     0 |     0  
  Static files     |  6816 |  6816  
  Processed images |     0 |     0  
  Aliases          |     2 |     1  
  Sitemaps         |     2 |     1  
  Cleaned          |     0 |     0  

Built in 7362 ms
Watching for changes in /home/jmooring/temp/jzeg-net.github.io/{package.json,site}
Watching for config changes in /home/jmooring/temp/jzeg-net.github.io/config/_default, /home/jmooring/temp/jzeg-net.github.io/config/development
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

Change detected, rebuilding site.
2023-06-19 16:17:09.365 -0700
Source changed WRITE         "/home/jmooring/temp/jzeg-net.github.io/site/content/about/index.en-us.md"
Total in 58 ms

Change detected, rebuilding site.
2023-06-19 16:17:12.866 -0700
Source changed WRITE         "/home/jmooring/temp/jzeg-net.github.io/site/content/about/index.en-us.md"
Total in 55 ms

Change detected, rebuilding site.
2023-06-19 16:17:16.366 -0700
Source changed WRITE         "/home/jmooring/temp/jzeg-net.github.io/site/content/about/index.en-us.md"
Total in 69 ms

etc.

I made 50 changes, no errors.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.