Giter VIP home page Giter VIP logo

Comments (7)

mcohen01 avatar mcohen01 commented on July 25, 2024

Appreciate the links. I'll take a look at this over the weekend Allen, the function that returns the S3Client is currently memoized. Are you seeing this exception only with very large files?

from amazonica.

bilus avatar bilus commented on July 25, 2024

Have you had a chance to look into this? I experience different behaviour but after a whole day's worth of debugging I begin to think its due to garbage collection.

It's very difficult to recreate using a short fragment of code but it reliably occurs in production (aot) -- when the user triggers upload after ~10 second pause, it fails with "Upload canceled". It doesn't occur if uploads are ran every 3 seconds. Any thoughts?

The reason I'm thinking along garbage collection lines is this line of code:

(amazonica.core/set-client AmazonS3Client (find-ns 'amazonica.aws.s3))

If it's triggered right before an upload, the problem seems to be gone.

UPDATE: It isn't gone, it just appears to show up less often.

In any case, this is the stack trace:

com.amazonaws.AmazonClientException: Upload canceled
    retryable: true
com.amazonaws.services.s3.transfer.internal.UploadMonitor.call       UploadMonitor.java:  142
com.amazonaws.services.s3.transfer.internal.UploadMonitor.call       UploadMonitor.java:   50
                           java.util.concurrent.FutureTask.run          FutureTask.java:  266
             java.util.concurrent.ThreadPoolExecutor.runWorker  ThreadPoolExecutor.java: 1142
            java.util.concurrent.ThreadPoolExecutor$Worker.run  ThreadPoolExecutor.java:  617
                                          java.lang.Thread.run              Thread.java:  745

from amazonica.

mcohen01 avatar mcohen01 commented on July 25, 2024

I haven't looked into it much. As far as gc goes, it's worth noting that the AmazonS3Client (or any *Client) is memoized.

from amazonica.

bilus avatar bilus commented on July 25, 2024

Yes, I've reviewed the code and it seems that nothing should get
garbage-collected. It's a very tough problem but it shows up very reliably
in our production code (we've worked around it by retrying uploads).

Apart from AmazonS3Client, is there any state shared between calls to
upload? TransferManager seems to be created from scratch as is
UploadManager (which appears to be the place where "Upload canceled" can be
raised) so on the whole seems odd that it fails on the first upload,
succeeds on an upload that follows within a very brief time span. Then you
wait 10 seconds and it fails again. Same credentials, same file etc.

On Thu, Feb 26, 2015 at 3:41 AM, Michael Cohen [email protected]
wrote:

I haven't looked into it much. As far as gc goes, it's worth noting that
the AmazonS3Client (or any *Client) is memoized
https://github.com/mcohen01/amazonica/blob/master/src/amazonica/core.clj#L234.


Reply to this email directly or view it on GitHub
https://github.com/mcohen01/amazonica/issues/65#issuecomment-76112324.

from amazonica.

mcohen01 avatar mcohen01 commented on July 25, 2024

The TransferManager wasn't memoized, that's the only obvious thing to me from looking at the code. If you consistently see this issue, maybe you can run 0.3.19 and see if it's resolved or still there....

from amazonica.

bilus avatar bilus commented on July 25, 2024

Thanks! For the time being the workaround works for us but we have it in
our issue list so we're certainly going to look into this soon.

On Thu, Feb 26, 2015 at 11:20 PM, Michael Cohen [email protected]
wrote:

The TransferManager wasn't memoized, that's the only obvious thing to me
from looking at the code. If you consistently see this issue, maybe you can
run 0.3.19 and see if it's resolved or still there....


Reply to this email directly or view it on GitHub
https://github.com/mcohen01/amazonica/issues/65#issuecomment-76287150.

from amazonica.

marco-m avatar marco-m commented on July 25, 2024

@bilus did you have a chance to test a more recent version of amazonica ? Is the bug still there or can this ticket be closed ?

from amazonica.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.