IBM Cloud Docs
Why does my app connection fail?

Why does my app connection fail?

Your application connects to another service, such as a database. When your app runs, you notice that the connection ends unexpectedly, and you receive an error similar to the following example.

[IBM][CLI Driver] SQL30081N  A communication error has been detected. Communication protocol being used: "SSL". 

By default, your app times out after 5 minutes. If it does not receive any updates from the connection within this time, then your app ends the connection. For more information, see Application defaults and limits.

You can resolve this issue by changing the timeout value for your app. If your app requires a connection time that is longer than 10 minutes, configure your app to include a heartbeat connection to the other service, which keeps your connection active.

You can also run a Code Engine job and then return the output to your app. For more information about jobs, see Working with jobs and job runs.

For more information about troubleshooting app connection failures when you use a proxy, see Why does my app connection fail when using a proxy?

Updating your app timeout value from the console

To update your app from the console,

  1. Open the Code Engine console.
  2. Click the project that contains your app.
  3. Click the application that you want to work with. This action opens the application page.
  4. Click the Configuration tab. From the Resources & scaling tab, change the value in the Request timeout (seconds) field. The maximum value is 600 seconds (10 minutes).
  5. Click Deploy to save your change and deploy the app revision.

Updating your app timeout value with the CLI

To update your app with the CLI, run the app update command with the --request-timeout option set to the new timeout value. The maximum value is 600 seconds (10 minutes).

After your app is updated, Code Engine creates a revision of your app. When the app revision reaches a Ready state, all traffic is routed to this new instance.