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

Timeout exception when upload large file #8

Open
GeniusWiki opened this issue Dec 23, 2011 · 2 comments · Fixed by #9
Open

Timeout exception when upload large file #8

GeniusWiki opened this issue Dec 23, 2011 · 2 comments · Fixed by #9

Comments

@GeniusWiki
Copy link

When I try to upload a large file, it reports the HttpClient timeout exception. After this failure, Github also lists the partial uploaded files with the whole file size - I think this is github issue. However, is it possible to disable the timeout exception. As you know, upload is normally a large file, that may take hours.

By the way, it looks your script only works with above ruby1.9.1. Can you put this on your README file.

Thanks your script.

@bil-bas
Copy link
Contributor

bil-bas commented Jan 27, 2012

"However, is it possible to disable the timeout exception" - Can you tell me how to do this? The github uploader is working fine for me, unless it takes more than a couple of minutes to upload the file (the HTTPClient::SessionManager#send_timeout seems to default to 120s, but I'm lost as to how to change that from outside).

@bil-bas
Copy link
Contributor

bil-bas commented Jan 27, 2012

Oops, ignore me, I was going about it entirely backwards!

Instead of HTTPClient.post(...) when uploading, I needed to edit the script to use:

client = HTTPClient.new
client.send_timeout = 60 * 60 # Hour is enough, even if 2 minutes isn't. I get 2MB/minute, which limited me to < 4MB upload.
client.post(...)

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