I have a build that just says `killed` . Is there ...
# seed
m
I have a build that just says
killed
. Is there any way to find out what the actual error is?
I'm trying to run depcheck, and get all packages and services updated with appropriate package.json references. It's in a mono-repo, and there are a bunch of things in the main package.json.
I tried the chat in the seed console, but it says they typically reply in a few hours. It's been >2 hrs, and said to try hopping on this slack channel.
@Frank @Jay I was getting Out of memory issues before, so I upgraded to
Medium SG
build machines, but now this
killed
issue with no other logs is stopping progress. I'm going back to
Standard SG
because it doesn't work regardless.
f
Hey @Michael Tuttle, can you try using a Large SG machine and see if that helps?
m
Well the out of memory issue went away when I went to
Medium SG
, but then it just started saying
Killed
. I'm trying to package locally right now, and it's taking forever.
f
Yeah, we often see Killed also being caused by out of memory
Can you send me a link to the build?
m
DM'd you the link
My local
package
just completed I ran it with
time
Copy code
1979.54s user 266.06s system 149% cpu 25:06.78 total
f
yeah.. you are using
serverless-webpack
right?
m
No, I don't see
serverless-webpack
anywhere in this project.
f
how many functions do u have in the service u
packaged
locally?
m
Ironically it is only 1 function.
f
🤯 what?! I’m looking at the build, which service was this?
m
I'm not terribly familiar with mono-repos and serverless, so I'm guessing there's something messed up there.
The one I just did locally was
backoffice-api
f
can you share what plugins do u have in ur
serverless.yml
?
m
Copy code
- serverless-pseudo-parameters
  - serverless-prune-plugin
  - serverless-offline
  - serverless-plugin-monorepo
  - serverless-deployment-bucket
  - serverless-plugin-aws-alerts
f
^ oh btw, can u give the Large machine a try on Seed as we try to figure it out here
m
I'll just upgrade that one service, and retry. The others probably have a similar issue.
f
yup
m
Alright build 15 has started.
f
Nice
Can u comment out the
serverless-plugin-monorepo
plugin and try
package
the
backoffice-api
service again locall?
m
yeah that went much quicker.
Copy code
6.49s user 1.76s system 108% cpu 7.615 total
There isn't anything in the
node_modules
though.
f
I see.. was it not empty with the
serverless-plugin-monorepo
plugin?
m
Correct. I'm running it again to verify though.
f
It seems the build with large machine made it further, but timed out after 20min?
m
Looks like it. I'm moving it back to
Standard SG
for now.
Confirmed it does have node_modules populated when using
serverless-plugin-monorepo
it still took a long time though:
Copy code
2018.50s user 133.80s system 148% cpu 24:07.64 total
f
actually, i’m getting the team to up the timeout limit for the project.
Gimme a sec, and then let’s give the Large machine another try
m
Let me know when it's upgraded.
f
It’s ready. Can you give it a try now?
m
Updated back to large, and build 16 is starting now.
Looks like that worked, but it took 21m 12s.
It took nearly 19 minutes to just package,
f
Oh wow..
It seems like you’d need to use the Large machine for all services.
Seed automatically caches the node modules in a yarn workspace, if you guys can figure out a way to leverage the cache more and maybe move away from the plugin, the builds are going to be much faster i think.
m
Yeah previous places I've worked at I just loaded all the node_modules into a lambda layer, and didn't include them in the function at all. I guess I need to figure out how to do that with a monorepo.
f
It might require some testing on ur end, but I wonder if u bundled the code using
serverless-bundle
or
serverless-esbuild
, would that be easier. So you don’t have to deal with a layer, and the Lambda code size will be much smaller. So faster bootup.
m
I just tried
serverless-esbuild
it doesn't appear to work with yarn workspaces / monorepos build 17. Is there something I'm missing?
f
what’s the error are you gretting?
m
I think I might have it figured out. There are some packages with optional peer dependencies but serverless-esbuild needs it to exist, and then one other that I'm going to set as an external dependency.
One failed with
Copy code
"Unzipped size must be smaller than 177035915 bytes
The other one just says
Copy code
Error: The service was stopped
      at /tmp/seed/source/node_modules/esbuild/lib/main.js:1334:25
      at /tmp/seed/source/node_modules/esbuild/lib/main.js:665:9
      at Socket.afterClose (/tmp/seed/source/node_modules/esbuild/lib/main.js:643:7)
      at Socket.emit (events.js:412:35)
      at Socket.emit (domain.js:475:12)
      at endReadableNT (internal/streams/readable.js:1334:12)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)
build 20