aws-sam-cli: Too many open files error when using a .jar
Staring a local API using SAM Local and a java8 project is apparently hitting a open file limit when decompressing the jar.
This always happens when processing the first request.
$ sam local start-api ⏎
2017/09/08 14:30:54 Connected to Docker 1.30
2017/09/08 14:30:54 Successfully parsed template.yaml
2017/09/08 14:30:54 Fetching lambci/lambda:java8 image for java8 runtime...
java8: Pulling from lambci/lambda
Digest: sha256:7c7de2243109afc521e5414bb71a0b674a6c42019d5d2c92b6a4c88a17de1270
Status: Image is up to date for lambci/lambda:java8
2017/09/08 14:30:56 Fetching lambci/lambda:java8 image for java8 runtime...
java8: Pulling from lambci/lambda
Digest: sha256:7c7de2243109afc521e5414bb71a0b674a6c42019d5d2c92b6a4c88a17de1270
Status: Image is up to date for lambci/lambda:java8
Mounting static files from /Users/pfandrade/Repos/api.outercorner.com/Diagnostics at /
Mounting com.outercorner.api.diagnostics.DiagnosticsHandler (java8) at http://127.0.0.1:3000/diagnostics [POST]
Mounting com.outercorner.api.diagnostics.DiagnosticsHandler (java8) at http://127.0.0.1:3000/diagnostics/{product} [GET]
You can now browse to the above endpoints to invoke your functions.
You do not need to restart/reload SAM CLI while working on your functions,
changes will be reflected instantly/automatically. You only need to restart
SAM CLI if you update your AWS SAM template.
2017/09/08 14:31:17 Invoking com.outercorner.api.diagnostics.DiagnosticsHandler (java8)
2017/09/08 14:31:17 Decompressing diagnostics-1.0.0.jar into runtime container...
2017/09/08 14:31:17 ERROR: Failed to decompress archive: open /private/var/folders/4q/6gh24k9d0q78z_6l2483q2y00000gn/T/aws-sam-local-1504877477416305000/com/amazonaws/services/s3/model/GetBucketMetricsConfigurationResult.class: too many open files
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
Within the next 24-48hrs.
I believe this is now fixed in our development branch (commit: https://github.com/awslabs/aws-sam-local/commit/ae96c1c419d6424d64691d6c3fa74e8cdab4b3ef) and is just awaiting our next release.
We don’t have a fixed date on our next release, it’s more just balancing enough new features to be meaningful and not annoy people with having to update to frequently…
Is this something that’s particularly frustrating, or are you ok with the workaround you mentioned above for another week or two?