'Application size in appengine suddenly much bigger (go 1.14)
We are using google appengine with go114 runtime. Our application size was usually around the 40mb. Suddenly from one moment to the other the size of our application versions went to 240mb, without any change on our side.
The strange thing is that the same code version resulted in one environment still to 40mb and in the other to 240mb. Later version also increased in the first environment.
There are not changes on our code whatsoever which could have impacted any of this, but I have also no clue what could have caused this on the appengine side of things.
Anyone knows what could have caused this rise of application size?
Solution 1:[1]
I opened ticket to Google and I got the following answer:
According to our App Engine product team, the previous version size was computed as the sum of the sizes of user code files, error blobs and static files.
When the infrastructure change was made, due to other dependencies, version size started being computed using the sizes of the user layers of the container (considering values such as raw_bytes, tar_bytes, file_bytes, etc) rather than just the size of the code itself. Since user layers may contain far more than just the code files, the version size appears significantly larger.
Solution 2:[2]
I found a similar issue to the one you are facing in this google groups post, but with the Java SDK. I would say that the reasons mentioned in there also apply to your case:
There are a number of reasons which may contribute to the different sizes, particularly in the past, the size difference in the builds for the same application code has been seen to relate to different implementations of the functions (i.e. deploy) and the tools in each SDK and the plugins. Hence, to understand better the cause may require reviewing the differences between the plugins used and the App Engine SDK versions, and how the changes may have applied to your application.
That being said you could open a support case for Google Cloud to check what causes that issue and get recommendations on how to mitigate that in your specific case.
Solution 3:[3]
I had the same problem with the python web app in App Engine.
Each file that was added to requirements.txt increased the size of the application much more than the size of the file.
The solution was to get the file out of the requirements.txt and add it directly to a modules folder.
Example: google-cloud-recaptcha-enterprise added 20MB if added to requirements.txt and only 100KB if included in a modules folder.
It is not always recommended to do it but can be a solution for heavy cases.
The other thing that has to be checked is the .gcloudignore file
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Stéphane Conq |
Solution 2 | Ralemos |
Solution 3 | GAEfan |