MyCATApache / Mycat-Web

Apache License 2.0
189 stars 222 forks source link

mycat-web 监控数据为空 #119

Closed cjldw closed 7 years ago

cjldw commented 7 years ago

mycat1.6 下的conf/server.xml设置了useSqlStat为1

查看报错信息 database is locked?

查询失败,系统异常!case: ↵### Error querying database. Cause: java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked)↵

The error may exist in file [/data/app/mycat-web/mycat-web/WEB-INF/classes/mybatis/mycat/syssqlslowMapper.xml]↵

The error may involve SYSSQLSLOW.sqlslow-Inline↵

The error occurred while setting parameters↵

SQL: select START_TIME,START_TM,EXECUTE_TIME,USER,CONTENT as "SQL",DB_NAME as "DATASOURCE",IPAddr from t_mycat_syssqlslow WHERE DB_NAME = ? and START_TM between ? and ? and EXECUTE_TIME >= ? order by START_TIME desc↵

Cause: java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked)↵; uncategorized SQLException for SQL []; SQL state [null]; error code [5]; [SQLITE_BUSY] The database file is locked (database is locked); nested exception is java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked)

chenwei97 commented 7 years ago

兄弟解决了吗,遇到和你一样的坑,搞了几天了没有头绪。

cjldw commented 7 years ago

问题好像是sqlite文件锁定了, 你暂停服务, 然后复制sqlite数据库文件, 然后把原来的删除掉, 再把复制的文件重命名到原来那个文件, 在启动服务, 我这样做可以了, 但没过多久, 又锁了, 最后把sqllite换成了mysql