Comments (7)
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.
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.
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.
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.
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.
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.
@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)
- Calling S3 multipart functions and eastwood warnings HOT 2
- acm namespace under certificatemanager.clj causes import to fail HOT 1
- SQS send-message with message-attributes HOT 3
- Update README.md Lambda Section
- Old dependencies have known vulnerabilities HOT 1
- How to get the uri of a file saved to aws using put-object?
- Unaccurate :arglists for #'amazonica.aws.simpleemail/send-email HOT 3
- Support for KCL 2 (enhanced fan out)
- How to get the progress in uploading to an s3 bucket? HOT 2
- Route53 list-hosted-zones in China HOT 1
- Details on "Could not determine best method to invoke for download using arguments"
- Kinesis checkpointing does not work correctly when leasing multiple shards
- Kinesis client workers do not gracefully shutdown
- How to start new Kinesis worker at InitialPositionInStream.LATEST? HOT 1
- s3 region error
- Very large transient libraries HOT 2
- get-shard-iterator with AT_TIMESTAMP not working HOT 1
- Kinesis worker doesn't use amazonica credentials mechanism HOT 2
- s3 example from the README throws Execution error (IllegalStateException)
- No release tags since 2015
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazonica.