---
title: "How do I resolve a Composer memory limit error during code build?"
date: "2025-05-27T09:36:45+00:00"
summary: "Resolve Composer memory limit errors during code build with our guide. Learn best practices for Drupal Starter Kits and Composer usage."
image:
type: "article"
url: "/acquia-cloud-platform/add-ons/code-studio/help/69286-how-do-i-resolve-composer-memory-limit-error-during-code-build"
id: "07d86e36-abda-45b5-bf83-28c59aad0a02"
---

**Description**

**Build stage**

**Job**

**Error message**

**Category**

**Responsibility**

[Build Drupal](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-build-drupal-stage)

[Build Code](https://docs.acquia.com/acquia-cloud-platform/add-ons/code-studio/docs/customizing-code-studio/drupal-auto-devops/autodevops-jobs#section-build-code-job)

`Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/ Composer/DependencyResolver/Solver.php on line 201.`

Application

Customer

**Potential cause**

The application uses an older version of the Drupal Starter Kits project template, which causes a Composer memory limit error.

**Solution**

Confirm that your application meets the following best practices:

*   From `composer.json`, remove the lines that point to the old Drupal Starter Kits project template. Drupal Starter Kits utilizes the [Acquia Drupal recommended project](https://github.com/acquia/drupal-recommended-project#acquia-drupal-recommended-project).
*   Commit `composer.lock`.
*   Use Composer 2.
*   Analyze the delta between a working `composer.lock` and the failing `composer.lock`.