cancel
Showing results for 
Search instead for 
Did you mean: 

Composer install fails with curl errors from repo.packagist.org - BunnyCDN connection issues

Composer install fails with curl errors from repo.packagist.org - BunnyCDN connection issues

Updated issue description:

Problem: Persistent Composer install failures when using official Packagist repository. Affects both HTTP/1.1 and HTTP/2.

Environment:

  • Environment: Docker containers
  • PHP: 8.1
  • Composer: 2.8.4
  • Magento: 2.4.7-p7

Errors encountered:

curl error 92: HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)curl error 18: transfer closed with 34 bytes remaining to read

 

Key observations:

  • Same errors occur with both HTTP/1.1 and HTTP/2
  • Browser access to same URLs works fine
  • Problem specific to Composer requests from Docker containers
  • BunnyCDN headers visible: Server: BunnyCDN-DE1-864
  • Multiple package downloads fail with same pattern

Troubleshooting attempted:

  • Forced HTTP/1.1 with various timeout configurations
  • Multiple PHP/Composer versions
  • Different Docker networking configurations
  • Cache clearing

Working workaround: Chinese mirror (https://packagist.phpcomposer.com) works perfectly, suggesting infrastructure-specific issue with BunnyCDN serving repo.packagist.org.

Question: Known issues with BunnyCDN infrastructure for Composer requests from Eastern Europe? Is this a regional routing/peering problem?

2 REPLIES 2

Re: Composer install fails with curl errors from repo.packagist.org - BunnyCDN connection issues

Yeah, I’ve run into that same Composer issue before — those curl errors from BunnyCDN can be really frustrating. In my case, it turned out to be a routing problem inside Docker. Switching to the Chinese mirror and using --prefer-dist helped a lot, and setting a custom DNS also made things more stable. Kind of like finding the right Special Needs Pediatric Dentist, it’s all about small, careful tweaks to get things running smoothly again without major headaches.

Re: Composer install fails with curl errors from repo.packagist.org - BunnyCDN connection issues

 

It sounds like a network-level issue between BunnyCDN’s edge node and your Docker host rather than Composer itself.

  • Since the Chinese mirror works, the problem is likely BunnyCDN’s regional edge (DE1) or its upstream route to your ISP/data center.

  • Try forcing Composer to use --prefer-dist -vvv to confirm the failing URLs and add COMPOSER_DISABLE_NETWORK_TLS only for debugging.

  • Test outside Docker (curl -v https://repo.packagist.org/p/...) to confirm it’s not container DNS/network.

  • If it only fails inside Docker, check MTU/firewall and update Docker’s network driver.

  • Ultimately you may need to open a ticket with Packagist/BunnyCDN including traceroute + curl debug logs so they can investigate the affected edge node.

The workaround mirror is fine short-term, but the root fix will come from Packagist/BunnyCDN or your network provider.