Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.add() stuck #245

Open
zinootje opened this issue Nov 8, 2020 · 5 comments
Open

client.add() stuck #245

zinootje opened this issue Nov 8, 2020 · 5 comments

Comments

@zinootje
Copy link

zinootje commented Nov 8, 2020

i have a directory Data which looks like this:
Data/
├─ subfolder/
│ ├─ B.html x 5000
├─ A.html
with A about 4 mb and 5000 files B each 4kb large.

when i add it with the command line (ipfs add .\Data\ -r) it takes about 10 seconds to add.
when i try to add it with you libary (client.add("Data",recursive=True)) it is still running after 5 minutes.
running go-ipfs v0.7.0 localy on a windows host
if you need more information let me know

@zinootje
Copy link
Author

i think i found the cause , because go-ipfs sends the hash result immediately but the python http.client doesn't read the socket until all data is send it get stuck with a tcpzerowindow. This is only o probleme with a lot of files presumably because only then ipfs-go sends more data than the socket buffer

@zinootje zinootje changed the title client.add() stuck or to slow client.add() stuck Nov 21, 2020
@ntninja
Copy link
Contributor

ntninja commented Dec 2, 2020

Thank you! However, I do not believe this will be solvable using the current requests backend without resorting to bad hacks.

Will reconsider this once the new HTTPx backend is finally released.

@zinootje
Copy link
Author

zinootje commented Dec 4, 2020

Your right i solved for now with some bad hacks , monky patching the request libary to read the socket every time after sending a chunk. Should a bug be filled for this with requests ?

@c0llab0rat0r
Copy link
Contributor

Your right i solved for now with some bad hacks , monky patching the request libary to read the socket every time after sending a chunk. Should a bug be filled for this with requests ?

@zinootje,

Do you still have your monkey patch? Would you be able to share it here?

@zinootje
Copy link
Author

zinootje commented Oct 7, 2021

Sorry for the late reply, do you still need it ? If so i can try to dig it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants