ipfs / ipfs/kubo

IPFS Add With Directory+OnlyHash Through Reverse Proxy Gives Timeout Errors

Open
#6,724 4 comments 0 reactions 0 assignees View on GitHub
kind/bug
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:

```
go-ipfs version: 0.4.22-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.7
```

#### Description:

A user of one of my services has routinely had propblems with go-ipfs nodes timing out when running the `js-ipfs-http-client` equivalent of `go-ipfs` `ipfs add` with a very particular set of options. They have to be:

* `--wrap-with-directory`
* `--only-hash`

When this kind of request is happening I can see logs like the following on my `go-ipfs` node:

```
Oct 22 23:57:35 delta-node-2 ipfs_manager_script.sh[20924]: 23:57:35.234 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 04:05:18 delta-node-2 ipfs_manager_script.sh[20924]: 04:05:18.128 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 04:30:20 delta-node-2 ipfs_manager_script.sh[20924]: 04:30:20.757 ERROR basichost: resetting stream deadline: stream closed basic_host.go:267
Oct 23 05:00:30 delta-node-2 ipfs_manager_script.sh[20924]: 05:00:30.294 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:01:42 delta-node-2 ipfs_manager_script.sh[20924]: 05:01:42.075 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:03:11 delta-node-2 ipfs_manager_script.sh[20924]: 05:03:11.903 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:04:46 delta-node-2 ipfs_manager_script.sh[20924]: 05:04:46.363 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:13:40 delta-node-2 ipfs_manager_script.sh[20924]: 05:13:40.364 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:21:39 delta-node-2 ipfs_manager_script.sh[20924]: 05:21:39.093 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:23:41 delta-node-2 ipfs_manager_script.sh[20924]: 05:23:41.214 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
Oct 23 05:59:38 delta-node-2 ipfs_manager_script.sh[20924]: 05:59:38.902 ERROR core: failure on stop: context canceled; TODO: mock repo builder.go:47
```

It doesn't appear that this option combination will always cause the issue, but more often than not it will. I'm using a custom proxy server I wrote using https://golang.org/pkg/net/http/httputil/ however I highly doubt this is the probelm, as the service is extremely stable under all other conditions, except when this particular option combination is being invoked.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.