Skip to main content

Cache Size Configuration

Appcircle has a limit for cache sizes that can be pushed or pulled on the build workflows.

The maxBodySize parameter in the global.yaml file allows you to configure the maximum cache file size that can be uploaded with the Cache Push component.

By default, the cache size is set to 4096m. However, you can increase or decrease this limit according to your needs by modifying the global.yaml file.

caution

Be aware that this process will cause downtime since it requires a restart of the Appcircle server.

Configuring the Appcircle Server

We are assuming that you have installed the Appcircle server with version 3.10.0 or later.

To configure the maxBodySize parameter, you can follow the steps below:

  • Log in to Appcircle server with SSH or remote connection.

  • Go to the appcircle-server directory.

cd appcircle-server
  • Edit the global.yaml file of your project.
info

The spacetech in the example codes below are example project name.

Please find your own project name and replace spacetech with your project name.

To see projects, you can check the projects directory.

ls -l ./projects
vi ./projects/spacetech/global.yaml
  • Find the nginx entry, add or edit the key named maxBodySize, and set it to the desired value.
nginx:
maxBodySize: 5120m

If your global.yaml file does not have the nginx key, you can add it yourself.

Replace 5120m with the desired maximum cache size according to your needs. The size should be specified in megabytes (m).

caution

Larger cache sizes require more disk space on the Appcircle server. So be cautious about allowing large cache sizes in your installation.

  • Shutdown Appcircle server.
./ac-self-hosted.sh -n "spacetech" down
  • Apply configuration changes.
./ac-self-hosted.sh -n "spacetech" export
  • Boot Appcircle server.
./ac-self-hosted.sh -n "spacetech" up
tip

You should check the status of the Appcircle server after boot for any possible errors.

./ac-self-hosted.sh -n "spacetech" check

Once your server is up and healthy, you can run the build that requires pushing a cache file larger than 4096m but less than 5120m.

You can also reduce the default maxBodySize for security purposes.