Payload Too Large


#1

Hi folks, getting this trying to push a build (618mb):

[main]  Removing intermediate container 632bc6768a20
[main]  Step 136/136 : CMD bash start-wifi.sh
[main]   ---> Running in 951299b0daac
[main]   ---> f5cd6a02c09e
[main]  Removing intermediate container 951299b0daac
[main]  Successfully built f5cd6a02c09e
[Info]  Uploading images
[================>                                  ] 33%[Info]  Still working...
[Info]  Still working...
[Error]  An error occurred: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Payload Too Large</pre>
</body>
</html>
[Error]  Not deploying release.

remote: error: hook declined to update refs/heads/master

Used to work, not bombs with an error. Has a limit been introduces on the total size of build image?

– ab1


#8

We’ve taken a look at your output and its size in MB is well under the GB’s we know other customers use. We do note that your image has 136 layers, which might be hitting limits (as an example of the rough scale, aufs has a limit of 47 layers). Could you try combining a few of the layers?


#9

It’s a multi-stage build, so not quite sure why so many layers…

There are 16 RUN statements in the second stage build after the second FROM statement.

It has never been a problem until multi-container support was launched, so something must have changed.

Do you have the maximums published anywhere?


#10

We are trying to figure out where your issue is coming from, so there are no concrete limits that we can point to just yet.

As a test, would it work for if you do a resin deploy (with -b to build and -e to run an emulated build if you are building for a different architecture compared to your development machine). That would isolate things, and would make it possible to take a

Also, is this a Starter, Classic, or Legacy app? Starter & Classic only pushes to registry v2, while Legacy does to both registry v1 & v2. Might worth creating a “Starter” app if it’s not that, no need to even provision any device there, just do the push to that, see if that succeeds.

These should help us triage some of the issues, hopefully!


#13

Also you might need to update to the latest resin-cli to have multistage builds + emulation, just a heads up.


#15

These are all legacy apps, tried Starter and Classic as well and got mixed results (sometimes it builds OK, sometimes fails).

resin-cli just spins in Preparing:

[Info]    Creating default composition with source: /Users/foo-bar/test
[Info]    Building for armv7hf/raspberrypi3
[Build]   Building services... |
[Build]   main Preparing...```

#16

Update: changed to Classic, seems to be working now (more or less reliably).