Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?] multiple warning messages: "database is locked" #23

Closed
toni-moreno opened this issue Mar 27, 2018 · 0 comments · Fixed by #24
Closed

[Bug?] multiple warning messages: "database is locked" #23

toni-moreno opened this issue Mar 27, 2018 · 0 comments · Fixed by #24

Comments

@toni-moreno
Copy link
Collaborator

There is a lot of messages, but it seems all is running ok.

Anyway we would like to remove these warning messages

pseriescollector.log:time="2018-03-26 16:36:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '0474C494-F83A-4916-AB00-E699A2F6E6E2' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:36:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '70199CD0-489E-4792-BD6F-9A8F540837A8' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:36:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '2FF11A53-8706-4A38-9ECA-9958B0DBD9C9' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:37:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '5723CC4E-2D80-4DFA-A457-08A01F65626E' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:37:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '241AD0E7-65C8-4C95-BED0-910AD293D627' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:37:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '18F81F66-FEC1-478B-A424-889D2716B675' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:38:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '405EAAEA-8ACD-4D7B-92D6-69784EF6FE90' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:38:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '16FFD15F-AB86-4DD2-8D22-9133F064B7F2' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '31BFD1AD-3A47-4FC7-916D-9DD69D9B15AC' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '4E8DECB6-0077-4C3F-A58D-672DEDC662B6' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '4D07B689-41F9-45E1-98B0-944DE1AE1184' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '5F1528A6-BBD5-45D5-8177-45791F1D956D' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '2FF11A53-8706-4A38-9ECA-9958B0DBD9C9' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '139691B3-2BE7-4BBC-A6F0-C92FDEE62D3C' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '405EAAEA-8ACD-4D7B-92D6-69784EF6FE90' : database is locked\n"
pseriescollector.log:time="2018-03-26 16:39:22" level=warning msg="Fail to get NmonFileInfo  data filteter with id == '40500EE0-39AE-4815-86F4-6D9B5B05D79D' : database is locked\n"

It seems generated by

func (dbc *DatabaseCfg) GetNmonFileInfoArray(filter string) ([]*NmonFileInfo, error) {
var err error
var devices []*NmonFileInfo
//Get Only data for selected devices
if len(filter) > 0 {
if err = dbc.x.Where(filter).Find(&devices); err != nil {
log.Warnf("Fail to get NmonFileInfo data filteter with %s : %v\n", filter, err)
return nil, err
}
} else {
if err = dbc.x.Find(&devices); err != nil {
log.Warnf("Fail to get influxcfg data: %v\n", err)
return nil, err
}
}
return devices, nil
}

There is some issues on our XORM Framework

go-xorm/xorm#161

And this could be a possible workarround

mattn/go-sqlite3#39 (comment)

sbengo added a commit to sbengo/pSeriesCollector that referenced this issue Jun 4, 2018
toni-moreno added a commit that referenced this issue Jun 4, 2018
Try fix for locked db message, fix #23. Added some UI enhancements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant