Hi all,
I’ve got this warning when I build my site on my server:
WARN 2018/06/25 15:49:07 WARNING: Timed out creating content for page
"post/blumen-parade/index.md" (.Content will be empty). This is most
likely a circular shortcode content loop that should be fixed. If this
is just a shortcode calling a slow remote service, try to set
"timeout=20000" (or higher, value is in milliseconds) in config.toml.
The build is not finished.
Setting timeout=20000 has no effect.
I don’t get the warning on my local desktop. The site is built without problems locally.
When I don’t use this shortcode, the warning disappears and the site is built slowly but successfully. So maybe this is the offending shortcode the warning hints to.
<section>
<h2 class="f3 fw4 pa3 mv0">{{ with .Get "title" }}{{.}}{{ end }}</h2>
<div class="cf pa2">
{{ $matchstr := (.Get "src" ) }}
{{ range .Page.Resources.Match $matchstr }}
{{ $scaled := .Fill "362x362 smart" }}
{{ $unscaled := .Resize "1200x Gaussian" }}
<div class="fl w-50 w-25-m w-20-l pa2">
<a href="{{ $unscaled.RelPermalink }}" class="db link dim tc">
<img src="{{ $scaled.RelPermalink }}" alt="" title="" class="w-100 db outline black-10">
</a>
</div>
{{ end }}
</div>
</section>
The shortcode is called like this:
{{< gallery src="IMG_*" title="Blumenparade" >}}
The images are ressources in the folder of the content. They all have names like “IMG_20160630_203432.jpg”
The shortcode didn’t cause problems until I changed the design of the site. I was using it to make an album from the images in the content folder for quite some time.
I tried to build the site with different versions of hugo: from 0.39 to current.
I am working in a shared webspace, so there are other users on the machine using memory and cpu. I see with top that hugo uses the cpu heavily for some seconds and then disappears from the top screen. I can see the process with ps.
The warning is quite clear. Can’t I loop through files in a folder in the way I do? I don’t see the error. Please open my eyes.
And if the shortcode is ok. How can I debug the problem?
Ciao!
juh