Connection timed out


I’m regularly getting the “Connection timed out” error.


This was in other projects too, but I didn’t find, sorry.


Cirrus CI.


Ruby’s codecov via simplecov.

Commit SHAs

Codecov YAML

There is no.

Codecov Output

Finished in 0.60875 seconds (files took 0.48776 seconds to load)
32 examples, 0 failures
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
 No CI provider detected.
 Gzipping contents
 Uploading reports
    query: token=secret&flags&branch=enable_all_new_rubocop_cops&commit=4dc8cbab523ad41d89106bed22e778810aadd5e3
 Uploading to Codecov
Error uploading coverage reports to Codecov. Sorry
Failed to open TCP connection to (Connection timed out - connect(2) for "" port 443)
/usr/local/bundle/gems/codecov-0.1.19/lib/codecov.rb:384:in `format': undefined method `body' for nil:NilClass (NoMethodError)
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov/result.rb:49:in `format!'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov/configuration.rb:196:in `block in at_exit'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov.rb:214:in `run_exit_tasks!'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov.rb:202:in `at_exit_behavior'
	from /usr/local/bundle/gems/simplecov-0.18.5/lib/simplecov/defaults.rb:27:in `block in <top (required)>'

Steps to Reproduce

Just upload.

Expected behavior: Successful upload.

Actual behavior: “Connection timed out” error.

Flakiness? Sometimes.

Another PR in the same repository, 2 tasks:

Another repository, without PR, commit to the master:

Hi @AlexWayfer, thanks for opening this up. We are currently working on updating some pieces of the Ruby uploader. I’ll update this thread when we push the next minor update, which hopefully will alleviate this issue.

1 Like

We’re experiencing the same error with codecov-bash uploader.

@vgrigoruk can you supply a build URL for this? Also, are you seeing this intermittently or all the time?

The same fail with codecov version 0.2.0:

It’s a sever-side error, for your information. Or network-related.

@tom unfortunately, there is no public build URL available, as we’re using Buildkite CI with a private github repository.

It looks like could not be downloaded sometimes. To reproduce the issue, simply run curl -s -S in a loop for 5-10 times and you’ll get the following error:

curl: (7) Failed to connect to port 443: Operation timed out

1 Like

Based on response headers from curl -v, it looks like both scripts (/env & /bash) are served by nginx. I’m wondering why don’t use use CDN to distribute them?


@vgrigoruk, thanks for the suggestion, we are actively working to push these scripts to CDN. This should greatly help with the connection issues here.

1 Like

@AlexWayfer, we have released 0.2.1 which should give better indications of what is going wrong here.

@AlexWayfer, are you still running into issues? I see you closed this issue.


It’s the issue about format, please look more closely. There is an HTML response instead of JSON, so we were getting unexpected token.

But this thread, issue, is about Connection timed out error. This is network error, server-sided too, but another type of.

We are also experiencing timeouts at uploading. We are using the bash uploader from Github actions. It’s intermittent but quite frequent (5 to 10 times a day).

(Can’t provide a URL as it is a private repo, but contact me if you need more info.)

Hi @mtrias, could you DM me your Codecov output?

Sure thing. I tried to DM you here and got an error though “Sorry, new users can only put 7 links in a post”. Of course my output is full of URLs… Should I use an email instead?

1 Like

@mtrias apologies for that, I have DMed you.

@AlexWayfer, I released a new version of the gem, would you be able to try that out?

Thank you. Yes, on this weekend.

1 Like