0

There is no document available online for this error. Also there is nothing for this error code in Azure Function Troubleshoot guide here:

https://learn.microsoft.com/en-us/azure/azure-functions/recover-python-functions?tabs=coretools%2Cbash&pivots=python-mode-decorators#troubleshoot-python-exited-with-code-137

What can I try next?

I am on Azure's subscription plan for students.

halfer
  • 19,824
  • 17
  • 99
  • 186
Lakshay Dulani
  • 1,710
  • 2
  • 18
  • 45
  • Which python interprestor are you using? Can you change the interpretor and run func host start? in the terminal to start your function and check? – SiddheshDesai Apr 25 '23 at 07:30
  • hi i m using 3.9 the function worked for about 30-40 times. Post that it stopped working. I think because I am consuming a model of 340 mb hosted on Azure File share – Lakshay Dulani Apr 25 '23 at 07:34
  • You can try loading the model in chunks in your memory with 10-20 mb in your python code, Also if you have this function running on azure, try to scale your function app and run the function again? – SiddheshDesai Apr 25 '23 at 07:39
  • @SiddheshDesai how can I load the model in chunks currently the model is hosted on File share, which is mounted with my function i get direct access to it. and the function was firing instantly yesterday can it be because I am running it on Student subscription? – Lakshay Dulani Apr 25 '23 at 07:43
  • Student subscription does have few limitations on choosing app tiers, But after getting your model directly from file share load the model in function in chunks, refer this so post https://stackoverflow.com/questions/44729727/pandas-slice-large-dataframe-into-chunks by rodrigo-silveria – SiddheshDesai Apr 25 '23 at 07:46
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/253307/discussion-between-siddheshdesai-and-lakshay-dulani). – SiddheshDesai Apr 25 '23 at 07:47

1 Answers1

0

I do agree with @SiddheshDesai that,

  • Try to load the model from your file share to your Azure Function using chunks.

You can load the file as a chunk by following the code from this SO-thread's answer by @rodrigo-silveria to chunk the file after it is loaded in function with the code below:-

def chunkify(df: pd.DataFrame, chunk_size: int):
  start = 0
   l = df.shape[0]
  if l <= cs:
    yield df[:]
      return
   while start + cs <= l:
      yield df[start:cs + start]
      start = start + cs
  if start < l:
      yield df[start:]

Also, Try to scale your function app to higher tier like below:-

enter image description here

Try to deploy your function app in app service plan or premium plan for the scaling to work(There might be some limitation in your student account that would restrict you to deploying the function app in higher tiers than consumption plan).

RithwikBojja
  • 5,069
  • 2
  • 3
  • 7