"failed-fetching-container-result-too-large" error in the rep stdout log when running cf push in Tanzu Application Service for VMs
search cancel

"failed-fetching-container-result-too-large" error in the rep stdout log when running cf push in Tanzu Application Service for VMs

book

Article ID: 297497

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

When you push an application with the cf push command in Tanzu Application Service for VMs (TAS for VMs), it may fail with the following error:
StagingError - Staging error: staging failed
FAILED

You also see the following error in the rep stdout log:
{"timestamp":"2021-11-15T08:04:08.561681563Z","level":"error","source":"rep","message":"rep.executing-container-operation.task-processor.failed-fetching-container-result-too-large","data":{"container-guid":"d0fbd***-74**-**f6-**02-***0623466e5","container-state":"completed","session":"8355.1"}}


Resolution

This issue occurs when the size of the staging result file exceeds 20 KB limit.

The staging result file is similar to a temporary log, file including staging information such as start command line and so on, which is generated by Buildpack implementation. As of November, 2021, once the file size exceeds the hard-coded 20 KB limit, application staging fails. As a result, cf push itself fails for the end users.

The size of the staging result file tends to be bigger when specifying a longer start command via the app manifest file.

For example, you may see this issue if specifying Java system environment variable settings with very long strings in the app manifest for a Java application as below.
---
applications:
- name: too-long-env-variables
  instances: 1
    :
  env:
    JBP_CONFIG_JAVA_MAIN: '{ arguments: "-Denv_val=setting .... too_long_strings_exceeding_20KB_limit" }'

This issue tends to occur easily with Java applications using Java Buildpack. By default, the size of the staging result file generated by Java Buildpack is 16KB. As a result, you experience an issue by adding only 4 KB worth of strings via the app manifest file.

To resolve this issue, reduce the size of excessively long strings in the app manifest file.