Database communication link error occurded on Azure ML Service RRS feed

  • Question

  • I have used Azure Machine Learning Service and python programming language.  On Azure Machine Learning Service I have one python script in that script there is one normal Select query. whenever i have deploy models on azure then that time I got ML endpoint.  whenever i am posting input data on ML endpoint then i got ('08S01', '[08S01] [Microsoft][ODBC Driver 17 for SQL Server]Communication link failure (0) (SQLExecDirectW)') error.

    Also, I have used azure SQL Server Database.

    I am not able to understand why I got this error.  Is there any reason for this error?

    Thursday, May 14, 2020 7:59 PM

All replies

  • Hello Akshay,

    Are you using execute python script module where you are opening a connection to a SQL server to fetch the data? If Yes, Does this module execute successfully during training? 

    Another option that can be used is the import data module and use option Azure SQL Database to get the required data and then a corresponding data handling module like Edit Metadata, Select Columns in dataset or Partition and Sample to handle this data in corresponding Execute python script


    Friday, May 15, 2020 8:08 AM
  • Hello RohitMungi-MSFT

    Yes, this is the python script.  In Azure ML Service training part there is score.py script and from that score.py script i call another python script function and in that function i used select query.  whenever my Ml model trained and deployed i got endpoint.  I passes the input data to that endpoint then i got result from ml model but some time i got the communication link failure error.

    I used service principle authentication to connect the database from azure ml service.

    Is there any resloution for the above problem?


    Friday, May 15, 2020 3:40 PM
  • Hi Akshay,

    So, you are not using the designer to run your experiment rather the SDK to use a score.py file where you are calling another script to run a query on DB from the scoring script where the connection fails sometimes with the endpoint.

    Since you are using a trained model in your endpoint calling a DB for every call to the endpoint might not be feasible and it is probably erroring out in some scenarios. I am not an expert at SQL server errors but you can try our implementing some retry mechanism as mentioned in this thread to check if this can be mitigated.


    Friday, May 15, 2020 5:20 PM