Skip to content

Timeout exception when upload large file #8

Open

Description

@DapengNi

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.

Activity

  1. bil-bas commented on Jan 27, 2012

    @bil-bas
    Contributor

    "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).

  2. bil-bas commented on Jan 27, 2012

    @bil-bas
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions