Building Function written in Go times out. No visibility into cause.

I wrote some Go code, push to github, set up an App on DO, and… “Deployment failed”.

›   Error: While deploying 'webinit' (running remote build): The function
›   exceeded its time limits of 120000

I tried again with deploying a Function instead of inside an App.

That gave me a more detailed log but with basically the same information.

    "error":"The function exceeded its time limits of 120000 milliseconds."
  "status":"developer error"

Is there a better way to see these logs? I’d really like to know why the build is failing. It builds fine locally. This particular issue is being caused by importing the package It seems to timeout most of the time with it intermittently working.

To reproduce:

doctl serverless init --language go timeout-example

Update the hello.go to have this at the top:

import (
    _ ""

Then run

(cd timeout-example/packages/sample/hello; go mod init hello && go mod tidy)
doctl serverless deploy timeout-example

If anyone has advice on how to figure out what the issue is, I’d appreciate it.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I was running into this problem, also after adding the Go twilio client. Switching the runtime from go:default/go:1.17 to go1.20 seems to have resolved it for me.

Bobby Iliev
Site Moderator
Site Moderator badge
April 6, 2023

Hi there,

Usually what I do is add the --trace flag. It shows a log of network activity while performing a command.

I was able to reproduce the problem on my end and will flag this internally.

In the meantime, please reach out to our amazing support team who will be more than happy to assist you with this issue!

Hope that helps!

- Bobby.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel