Invalid connection between Matlab and Mysql

3 ビュー (過去 30 日間)
Shreya Dutta
Shreya Dutta 2022 年 4 月 5 日
回答済み: Dinesh 2023 年 12 月 22 日
Hi, my team is working on a pilot test project which requires real-time sensor or feedback data, which we are receiving at Simulink via MySql database. Very often, all the functions to collect data from the database run for a few days but one of the functions (not a particular one) shows the above error after running successfully for a few days. What could be the reason and how can we fix it?
  2 件のコメント
Walter Roberson
Walter Roberson 2022 年 4 月 5 日
What operating system are you running on?
Shreya Dutta
Shreya Dutta 2022 年 4 月 5 日
Hi Walter, I'm using Windows 10.

サインインしてコメントする。

回答 (1 件)

Dinesh
Dinesh 2023 年 12 月 22 日
Hi Shreya,
The error you're encountering in Simulink, which seems to arise from a MATLAB function block after a few days of runtime, may be due to several factors. These could include issues with the database connection, or unhandled edge cases in the data being received. Since it happens after a prolonged period, it's possible that the system is encountering a scenario not seen in the initial days, such as a specific type of data input, or there could be a growing resource allocation issue (memory leak error) that only becomes critical after a few days.
To resolve this, you'll want to implement error handling within your MATLAB functions to manage unexpected inputs or connection issues gracefully. Additionally, monitor system resources over time to check for leaks. You may also consider setting up a logging mechanism within your MATLAB code to record detailed error information when the issue occurs, which will be invaluable for troubleshooting.
The following link might help you:

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by