-
Notifications
You must be signed in to change notification settings - Fork 437
Open
Labels
type/bugIssues that are bugs.Issues that are bugs.
Description
When deploying a static site, i am getting an out of memory exception, followed by a number of other errors (attached)
I have narrowed it down to including the svg files from ionicon (part of ionic in our angular application). When I remove a number of these files, the error goes away. I haven't been able to pin it down to a specific set of files. All of the files are under 5kb. Total size for the entire site upload is under 4 MB.
Cloudwatch shows the following in /aws/lambda/$app-$env-TriggerStateMachineFunction
ERROR caught error: Error: State machine failed: The state/task 'CopyFiles' returned a result with a size exceeding the maximum number of bytes service limit.
And this prints to the command line from copilot:
runtime: out of memory: cannot allocate 8388608-byte block (1775140864 in use)
fatal error: out of memory
runtime: out of memory: cannot allocate 8388608-byte block (1775140864 in use)
fatal error: out of memory
goroutine 486 [running]:
runtime.throw({0x246aa0c, 0xd})
/root/.goenv/versions/1.21.1/src/runtime/panic.go:1077 +0x4d fp=0x69a17b4c sp=0x69a17b38 pc=0xd2ce7d
runtime.(*mcache).allocLarge(0x42e1e98, 0x500000, 0x1)
/root/.goenv/versions/1.21.1/src/runtime/mcache.go:236 +0x1c5 fp=0x69a17b78 sp=0x69a17b4c pc=0xd07d75
runtime.mallocgc(0x500000, 0x1fe7b20, 0x1)
/root/.goenv/versions/1.21.1/src/runtime/malloc.go:1123 +0x5bd fp=0x69a17bcc sp=0x69a17b78 pc=0xcff91d
runtime.makeslice(0x1fe7b20, 0x500000, 0x500000)
/root/.goenv/versions/1.21.1/src/runtime/slice.go:103 +0x4d fp=0x69a17be0 sp=0x69a17bcc pc=0xd421bd
runtime.makeslice64(0x1fe7b20, 0x500000, 0x500000)
/root/.goenv/versions/1.21.1/src/runtime/slice.go:117 +0x6d fp=0x69a17bf4 sp=0x69a17be0 pc=0xd4229d
github.com/aws/aws-sdk-go/service/s3/s3manager.(*maxSlicePool).newSlice(...)
/go/pkg/mod/github.com/aws/aws-sdk-go@v1.47.3/service/s3/s3manager/pool.go:226
github.com/aws/aws-sdk-go/service/s3/s3manager.(*maxSlicePool).newSlice-fm()
<autogenerated>:1 +0x67 fp=0x69a17c18 sp=0x69a17bf4 pc=0x1418987
github.com/aws/aws-sdk-go/service/s3/s3manager.(*maxSlicePool).Get(0xcf71840, {0x29a4200, 0x387b5e0})
/go/pkg/mod/github.com/aws/aws-sdk-go@v1.47.3/service/s3/s3manager/pool.go:77 +0x33c fp=0x69a17ca0 sp=0x69a17c18 pc=0x1413a7c
github.com/aws/aws-sdk-go/service/s3/s3manager.(*returnCapacityPoolCloser).Get(0xcc02350, {0x29a4200, 0x387b5e0})
<autogenerated>:1 +0x3b fp=0x69a17cbc sp=0x69a17ca0 pc=0x1417d1b
github.com/aws/aws-sdk-go/service/s3/s3manager.(*uploader).nextReader(0xcc00960)
/go/pkg/mod/github.com/aws/aws-sdk-go@v1.47.3/service/s3/s3manager/upload.go:499 +0x71 fp=0x69a17d30 sp=0x69a17cbc pc=0x1415c01
github.com/aws/aws-sdk-go/service/s3/s3manager.(*uploader).upload(0xcc00960)
/go/pkg/mod/github.com/aws/aws-sdk-go@v1.47.3/service/s3/s3manager/upload.go:391 +0x1dc fp=0x69a17db4 sp=0x69a17d30 pc=0x141541c
github.com/aws/aws-sdk-go/service/s3/s3manager.Uploader.UploadWithContext({0x500000, 0x5, 0x0, 0x2710, {0x29b499c, 0xd20cc38}, {0x0, 0x0, 0x0}, {0x299ab20, ...}, ...}, ...)
/go/pkg/mod/github.com/aws/aws-sdk-go@v1.47.3/service/s3/s3manager/upload.go:307 +0x18e fp=0x69a17e38 sp=0x69a17db4 pc=0x1414d2e
github.com/aws/aws-sdk-go/service/s3/s3manager.Uploader.Upload(...)
/go/pkg/mod/github.com/aws/aws-sdk-go@v1.47.3/service/s3/s3manager/upload.go:277
github.com/aws/aws-sdk-go/service/s3/s3manager.(*Uploader).Upload(0xcf71800, 0xe7028c0, {0x0, 0x0, 0x0})
<autogenerated>:1 +0x92 fp=0x69a17ed0 sp=0x69a17e38 pc=0x1418592
github.com/aws/copilot-cli/internal/pkg/aws/s3.(*S3).upload(0xd13a250, {0xd141880, 0x3e}, {0xd1a7180, 0x4d}, {0x2997e98, 0xd0137d0})
/codebuild/output/src1991231604/src/internal/pkg/aws/s3/s3.go:325 +0x167 fp=0x69a17f24 sp=0x69a17ed0 pc=0x141e877
github.com/aws/copilot-cli/internal/pkg/aws/s3.(*S3).Upload(0xd13a250, {0xd141880, 0x3e}, {0xd1a7180, 0x4d}, {0x2997e98, 0xd0137d0})
/codebuild/output/src1991231604/src/internal/pkg/aws/s3/s3.go:78 +0x4f fp=0x69a17f54 sp=0x69a17f24 pc=0x141c2ff
github.com/aws/copilot-cli/internal/pkg/cli/deploy.NewStaticSiteDeployer.func1({0xd1a7180, 0x4d}, {0x2997e98, 0xd0137d0})
/codebuild/output/src1991231604/src/internal/pkg/cli/deploy/static_site.go:74 +0x57 fp=0x69a17f84 sp=0x69a17f54 pc=0x1c5f817
github.com/aws/copilot-cli/internal/pkg/deploy/upload/asset.(*ArtifactBucketUploader).uploadAssets.func1()
/codebuild/output/src1991231604/src/internal/pkg/deploy/upload/asset/asset.go:138 +0x42 fp=0x69a17fc0 sp=0x69a17f84 pc=0x1c500f2
golang.org/x/sync/errgroup.(*Group).Go.func1()
/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:75 +0x5e fp=0x69a17ff0 sp=0x69a17fc0 pc=0x17a61ee
runtime.goexit()
/root/.goenv/versions/1.21.1/src/runtime/asm_386.s:1363 +0x1 fp=0x69a17ff4 sp=0x69a17ff0 pc=0xd5d2a1
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
/go/pkg/mod/golang.org/x/sync@v0.5.0/errgroup/errgroup.go:72 +0x97
Whole log attached.
Metadata
Metadata
Assignees
Labels
type/bugIssues that are bugs.Issues that are bugs.