---
name: codeengine-ts-app-connection-failwithproxy
title: Why does my app connection fail when using a proxy?
description: Your application connects to another service with a proxy such as IBM Cloud Internet Services (CIS), which is based on CloudFlare. When your app runs, you notice that the connection ends unexpectedly, and you receive an `ERROR_CONNECTION_CLOSED` message.
last-updated: 2025-06-11
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/codeengine?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Why does my app connection fail when using a proxy?
{: #ts-app-connection-failwithproxy}
{: troubleshoot}

Your application connects to another service with a proxy such as [IBM Cloud Internet Services (CIS)](https://cloud.ibm.com/docs/cis?topic=cis-getting-started&format=markdown), which is based on CloudFlare. When your app runs, you notice that the connection ends unexpectedly, and you receive an `ERROR_CONNECTION_CLOSED` message. 
{: tsSymptoms}



If you use Cloud Internet Services (CIS) or Cloudflare as a proxy for your Code Engine application, after 100 seconds, if Cloudflare does not detect an HTTP response, the connection is closed and a 524 error is given by the proxy.
{: tsCauses}


To resolve this situation, make sure that your code responds to the proxy within 100 seconds, or increase the timeout value.
{: tsResolve}

For more information about addressing timeout errors in Cloud Internet Services (CIS), see [Troubleshooting 500 class errors](https://cloud.ibm.com/docs/cis?topic=cis-html-5xx-errors&format=markdown). 

For more information about the Cloudflare timeout error, see [Timeout error 524 for Cloudflare](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/#error-524-a-timeout-occurred){: external}. 


For more information about troubleshooting other app connection failures, see [Why does my app connection fail](https://cloud.ibm.com/docs/codeengine?topic=codeengine-ts-app-connection-fail&format=markdown)?