Abstract:Database is a kind of important and fundamental computer system software. With the development of database application in all walks of life, a growing number of people begin to concern the stability of the database. Because of the numerous internal of external effect, performance anomaly may emerge when the Database running and it may cause huge economic loss. People usually diagnose database anomaly by analyzing monitoring metrics. However, there are hundreds of metrics in the system and ordinary database users are unable to extract valuable information from them. Some major companies employ DBA to manage the databases but the cost is unacceptable for many other companies. Achieving automatic database monitor and diagnose with low cost is a challenging problem. Current methods have many limitations, including high cost of metrics information collection, narrow range of application or poor stability. This study proposes an anomaly diagnose framework AutoMonitor which is deployed on the PostgreSQL database. The framework contains LSTM-based anomaly detection module and modified K nearest-neighbor algorithm-based root cause diagnose module. Framework consists of an offline training and an online diagnose stage. The evaluations on the datasets show that the proposed framework has high diagnose accuracy with minor overload to system performance.