Azure / Azure-DataFactory

Other
483 stars 588 forks source link

Azure Function 3608 error #234

Open bszewczyk opened 3 years ago

bszewczyk commented 3 years ago

Azure Functions block failes after 4 minutes of working despite azure function returns 200 code.

Error: Error code 3608 Troubleshooting guide Failure type User configuration issue Details Call to provided Azure function 'DecomposeData_AzureFunction_DecomposeDataWithPreds' failed with status-'BadGateway' and message - '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 502 - Web server received an invalid response while acting as a gateway or proxy server.

502 - Web server received an invalid response while acting as a gateway or proxy server.

There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

'.

CharlesAtDCube commented 3 years ago

I found the answer, that was the case for me ! (And yes, that sucks) https://stackoverflow.com/questions/59590293/long-running-azure-function-returns-502-but-the-function-is-actually-did-the-wo

bszewczyk commented 3 years ago

Yes, I thought that is some problem with time that my functions last. I thought that maybe it can be fixed by Microsoft

bszewczyk commented 3 years ago

Why issue is closed? That means it is fixed or won't be fixed?

fhljys commented 3 years ago

@bszewczyk , I thought Charles provided a solution though it is not a good one. But I will reopen it and notify related people. Thanks.

fhljys commented 3 years ago

Also find this: https://docs.microsoft.com/en-us/azure/data-factory/data-factory-troubleshoot-guide#error-code-3608

bszewczyk commented 3 years ago

Hi,

like it is written here https://docs.microsoft.com/en-us/azure/data-factory/control-flow-azure-function-activity#timeout-and-long-running-functions

Azure Fucntion block can last maximum 230 seconds even though funcion can last longer. My question is if it will be improved in azure data factory.

fhljys commented 3 years ago

That document actually links to here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions#timeout image So the limitation is actually from Azure Function instead of Azure Data Factory, right?

CharlesAtDCube commented 3 years ago

Hello,

Since the 230s limit is related to the fact that we call Azure Functions via HTTP, with RESTful verbs : the http calls should be stateless. As it is supposed to be stateless, it's legitimate that azure function blocks should not last for a long time. So the good practice would be to have a stateless function that returns "202 Accepted" or "201 Created" (job) for the time of the job run and after the job is done, the answer becomes "200 {"status": "succeded", "data" : [...]}.

[cid:ab5215ad-6eaa-4a27-8eaa-74867dabe9d9]https://dcube.fr/

Charles GOSSELIN @.**@.>

170, rue Raymond Losserand 75014 Paris


De : Beata Szewczyk @.> Envoyé : mardi 16 mars 2021 12:11 À : Azure/Azure-DataFactory @.> Cc : Charles GOSSELIN @.>; Comment @.> Objet : Re: [Azure/Azure-DataFactory] Azure Function 3608 error (#234)

Hi,

like it is written here https://docs.microsoft.com/en-us/azure/data-factory/control-flow-azure-function-activity#timeout-and-long-running-functions

Azure Fucntion block can last maximum 230 seconds even though funcion can last longer. My question is if it will be improved in azure data factory.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Azure/Azure-DataFactory/issues/234#issuecomment-800168627, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANRTHLXWVOZZH5QSQL4ETK3TD44GLANCNFSM4UESVQXQ.