Skip to main content
Answer

Cognite Functions: Function creation failing to deploy

  • April 25, 2025
  • 1 reply
  • 41 views

Leandro Souza dos Santos
Active
Forum|alt.badge.img+1

Since yesterday, I've noticed that deploying functions via the Cognite SDK is failing. Our strategy involves uploading a zip file of the function and then creating the function. While the file uploads successfully, the function creation process returns a "Gateway Timeout" error. I've tried deploying both locally and through the Azure Pipeline, but the error persists. Initially, I thought it might be a temporary instability, but the issue continues this morning.

 

Cognite API error

 

Best answer by Henrik Eiding

Hi!

We have investigated the request-id in your snapshot, and it looks like the error occurs because there exists two functions with the same external-ID. This should of course not be allowed, but has happened due to a race condition in the system. The workaround for you is to delete the functions with duplicated external-IDs, and doing so by referring to their IDs (and not external-IDs, as this would generate a 500 response again, due to this very bug).

We will look into how we can fix this bug. In the mean time, I suggest that you try to not create two functions with the same external-ID in close succession to avoid this from happening again.

Hope that helps!

Best regards,

Henrik Eiding

1 reply

  • Cognite
  • Answer
  • April 25, 2025

Hi!

We have investigated the request-id in your snapshot, and it looks like the error occurs because there exists two functions with the same external-ID. This should of course not be allowed, but has happened due to a race condition in the system. The workaround for you is to delete the functions with duplicated external-IDs, and doing so by referring to their IDs (and not external-IDs, as this would generate a 500 response again, due to this very bug).

We will look into how we can fix this bug. In the mean time, I suggest that you try to not create two functions with the same external-ID in close succession to avoid this from happening again.

Hope that helps!

Best regards,

Henrik Eiding