Runtime error after pushing hugo site

Im trying to build a simple personal blog at but after making my first post (that contains a few HTML plotly charts and runs perfectly on my local machine that is quite outdated) im having run time issues to deploy my site after pushing it to github. Im using Hugo Academic.

3:19:50 PM: Waiting for other deploys from your team to complete
3:20:33 PM: Build ready to start
3:20:35 PM: build-image version: ca811f47d4c1cbd1812d1eb6ecb0c977e86d1a1d
3:20:35 PM: build-image tag: v3.3.20
3:20:35 PM: buildbot version: 78b5536ab4f742c26705d3e953381b9cde6e22ef
3:20:35 PM: Fetching cached dependencies
3:20:35 PM: Starting to download cache of 101.3MB
3:20:36 PM: Finished downloading cache in 761.162799ms
3:20:36 PM: Starting to extract cache
3:20:39 PM: Finished extracting cache in 2.943539709s
3:20:39 PM: Finished fetching cache in 3.73212666s
3:20:39 PM: Starting to prepare the repo for build
3:20:40 PM: Preparing Git Reference refs/heads/master
3:20:42 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'public' versus '/' in the Netlify UI
3:20:42 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'hugo --gc --minify -b $URL' versus '' in the Netlify UI
3:20:42 PM: Starting build script
3:20:42 PM: Installing dependencies
3:20:42 PM: Python version set to 2.7
3:20:42 PM: Started restoring cached node version
3:20:45 PM: Finished restoring cached node version
3:20:45 PM: v12.18.0 is already installed.
3:20:46 PM: Now using node v12.18.0 (npm v6.14.4)
3:20:46 PM: Started restoring cached build plugins
3:20:46 PM: Finished restoring cached build plugins
3:20:46 PM: Attempting ruby version 2.7.1, read from environment
3:20:47 PM: Using ruby version 2.7.1
3:20:48 PM: Using PHP version 5.6
3:20:48 PM: 5.2 is already installed.
3:20:48 PM: Using Swift version 5.2
3:20:48 PM: Installing Hugo 0.72.0
3:20:48 PM: Hugo Static Site Generator v0.72.0-8A7EF3CF/extended linux/amd64 BuildDate: 2020-05-31T12:14:23Z
3:20:48 PM: Started restoring cached go cache
3:20:48 PM: Finished restoring cached go cache
3:20:48 PM: go version go1.14.4 linux/amd64
3:20:48 PM: go version go1.14.4 linux/amd64
3:20:48 PM: Installing missing commands
3:20:48 PM: Verify run directory
3:20:49 PM: ​
3:20:49 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
3:20:49 PM: β”‚        Netlify Build        β”‚
3:20:49 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
3:20:49 PM: ​
3:20:49 PM: ❯ Version
3:20:49 PM:   @netlify/build 2.0.27
3:20:49 PM: ​
3:20:49 PM: ❯ Flags
3:20:49 PM:   deployId: 5f0b5446d5c48a0008ca4577
3:20:49 PM:   mode: buildbot
3:20:49 PM: ​
3:20:49 PM: ❯ Current directory
3:20:49 PM:   /opt/build/repo
3:20:49 PM: ​
3:20:49 PM: ❯ Config file
3:20:49 PM:   /opt/build/repo/netlify.toml
3:20:49 PM: ​
3:20:49 PM: ❯ Context
3:20:49 PM:   production
3:20:49 PM: ​
3:20:49 PM: β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
3:20:49 PM: β”‚ 1. build.command from netlify.toml β”‚
3:20:49 PM: β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
3:20:49 PM: ​
3:20:49 PM: $ hugo --gc --minify -b $URL
3:50:35 PM: Build exceeded maximum allowed runtime

Thank you very much

I’m new to Hugo academic myself, but have gotten my site up and running on Netlify. Based on my limited experience, this sounds like a Hugo version problem. That is, Netlify is expecting a different version of Hugo than you have locally. This can be solved with settings in Netlify, but it sounds like the best way to handle it is with a netlify.toml file, which is what I have done. It’s explained nicely in this blog post:

Hi, thanks for your reply!
My local machine is running hugo 0.73.0, and the netlify.toml file was 0.72.0 , i tried to change it to 0.73.0 and the netlify log is reading 0.73.0, but im still getting this runtime error… did I made something wrong?

Its definelly my plotly charts. When i removed my post that contains then the build was done fine. But why? Locally its also running fine

Hmmm, I’m not sure, but it might be worth checking out this site which has plotly working in Hugo academic:

1 Like

I don’t use plotly much, but my guess is that’s it requiring a javascript library or something that you have locally but isn’t getting put in the right place to be served as a site. Plotly aside, I have had issues before with other things that require a javascript library and work locally but not when hosted.

1 Like

Hi, @ppnasser, the line below means that the build process was still running:

3:50:35 PM: Build exceeded maximum allowed runtime

Based on this, my best guess is that the code generating the plotly charts is querying a third-party API or database and that this connection isn’t being closed. Because the connection remains open the command never exits. This keeps the build process running indefinitely and our build system forcible exits once a timeout limit is reached.

Again, that is just a best guess. That is the most common reason this sort of timeout occurs though.

The solution for this is to make sure the code closes all connections and exits properly when complete.

If there are other questions, please let us know.

I don’t know if its it, becouse there are no web requests as i can run everything localy and offline only with my folder files… if there is such unclosed conection would my site build localy?

Found a solution: the charts were too light for a local machine but maybe too heavy for netlify. Could only deploy using the official plotlyjs cdn