File database is locked

polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

File database is locked

Postby polinom » Thu Mar 14, 2019 6:53 pm

Good evening.
Yandex Disk does not want to update the database file, it says that the database is locked. If you close Cintanotes, the database is updated, but after restarting the computer, the situation repeats. Neither after 2 minutes, nor after 30 minutes the file is not updated. What can be done?
https://yadi.sk/i/kTK2M5Z1hhwAmQ
gunars
Posts: 234
Joined: Fri Nov 08, 2013 5:35 am
Contact:

Re: File database is locked

Postby gunars » Fri Mar 15, 2019 3:49 am

Yandex Disk is probably similar to the Dropbox I use. Check your cintanotes.settings file and make sure you have:

notebook.disconnect.enabled = 1

It might also help to have:

notebook.disconnect.timeout.seconds = 10

This will enable CintaNotes to release control of the database after you make a change so that Yandex Disk can synchronize it.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: File database is locked

Postby CintaNotes Developer » Fri Mar 15, 2019 10:47 am

I join in to Gunars' advice.
(Thanks, btw!)
Alex
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Fri Mar 15, 2019 11:26 am

gunars wrote:Yandex Disk is probably similar to the Dropbox I use. Check your cintanotes.settings file and make sure you have:

notebook.disconnect.enabled = 1

It might also help to have:

notebook.disconnect.timeout.seconds = 10

This will enable CintaNotes to release control of the database after you make a change so that Yandex Disk can synchronize it.



These parameters were not in the file. Inserted rows, still not synchronized.
gunars
Posts: 234
Joined: Fri Nov 08, 2013 5:35 am
Contact:

Re: File database is locked

Postby gunars » Fri Mar 15, 2019 3:16 pm

Make sure this setting change exists on each machine you're syncing. Also, make sure you restart CN on each so the settings take effect.

Are you using the portable version of CN or the installed one? Which Windows and which CN version? I use the portable version from a folder in Dropbox so that the same version/settings are used no matter which machine I'm on (win 7, win 10). I'm not sure where the cintanotes.settings file goes for the installed CN, so maybe there's some issue there.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: File database is locked

Postby CintaNotes Developer » Fri Mar 15, 2019 5:20 pm

That's very strange that the parameters were not in the file. I'd suggest this might be the wrong file.
Could you please post the path to cintanotes.exe and cintanotes.settings that you edited?

Also note that you should always exit CN before editing cintanotes.settings, otherwise your changes will be overwritten.
Alex
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Fri Mar 15, 2019 6:17 pm

CintaNotes Developer wrote:That's very strange that the parameters were not in the file. I'd suggest this might be the wrong file.
Could you please post the path to cintanotes.exe and cintanotes.settings that you edited?

Also note that you should always exit CN before editing cintanotes.settings, otherwise your changes will be overwritten.


The path to cintanotes.exe : C:\Program Files (x86)\CintaNotes
The path to cintanotes.settings : c:\Users\polinom\AppData\Roaming\CintaNotes\
I did not leave the application, while cintanotes.settings is edited and saved.
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Fri Mar 15, 2019 6:22 pm

gunars wrote:Make sure this setting change exists on each machine you're syncing. Also, make sure you restart CN on each so the settings take effect.

Are you using the portable version of CN or the installed one? Which Windows and which CN version? I use the portable version from a folder in Dropbox so that the same version/settings are used no matter which machine I'm on (win 7, win 10). I'm not sure where the cintanotes.settings file goes for the installed CN, so maybe there's some issue there.


Tomorrow I will try to set up the same file cintanotes.settings on both computers. Win 7, local version 3.13.
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Fri Mar 15, 2019 6:38 pm

When loading Windows, Yandex disk cannot access the database. I close CN, Yandex disk synchronizes the database and all its changes, even if the CN is open. If the database is changed on the second computer, on the first computer the Yandex disk again cannot access the database.
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: File database is locked

Postby CintaNotes Developer » Sat Mar 16, 2019 5:37 am

polinom wrote:I close CN, Yandex disk synchronizes the database and all its changes, even if the CN is open.

This seems to be a bit self-contradictory, could you elaborate please?
Alex
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Mon Mar 18, 2019 3:39 pm

CintaNotes Developer wrote:
polinom wrote:I close CN, Yandex disk synchronizes the database and all its changes, even if the CN is open.

This seems to be a bit self-contradictory, could you elaborate please?


If you close the CN, the Yandex disk gets access to cintanotes.db and updates it from the cloud. After that, I launch CN again, add a note, and the Yandex disk immediately copies cintanotes.db to the cloud, without delay. If cintanotes.db is changed on another computer, you will have to repeat the whole procedure again.
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Tue Mar 19, 2019 10:13 am

gunars wrote:Make sure this setting change exists on each machine you're syncing. Also, make sure you restart CN on each so the settings take effect.

Are you using the portable version of CN or the installed one? Which Windows and which CN version? I use the portable version from a folder in Dropbox so that the same version/settings are used no matter which machine I'm on (win 7, win 10). I'm not sure where the cintanotes.settings file goes for the installed CN, so maybe there's some issue there.


Set identical settings on each computer, the problem remains.
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Tue Mar 19, 2019 10:16 am

What is the cintanotes.db-journal file for?
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: File database is locked

Postby CintaNotes Developer » Tue Mar 19, 2019 10:17 am

What version of YD do you have? Did you update to the latest version?
Alex
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Tue Mar 19, 2019 10:49 am

CintaNotes Developer wrote:What version of YD do you have? Did you update to the latest version?


Yandex Disk version 1.4.22. Version 3.0 is raw, there are some problems with data loss, so I use the old version.
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Tue Mar 19, 2019 3:45 pm

By the way, the exact same problem: viewtopic.php?t=2554
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Tue Mar 19, 2019 4:31 pm

Launched Process Monitor, it turned out CN accesses the database every 10 seconds. I attach my CN settings file to the screenshot.
https://yadi.sk/i/do-vsDpbIE6suA
cintanotes.settings
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: File database is locked

Postby CintaNotes Developer » Wed Mar 20, 2019 8:31 am

That's very interesting.
I checked the settings file, notebook disconnect is set at 10 seconds, which corresponds to the period you're observing.
We need to determine what code is called that requires DB access.
Could you please turn on the debug log in CN and record several such events?
This would definitely shed light on the issue.
Thanks!
Alex
polinom
Posts: 15
Joined: Thu Mar 14, 2019 6:50 pm
Contact:

Re: File database is locked

Postby polinom » Thu Mar 21, 2019 9:44 am

CintaNotes Developer wrote:That's very interesting.
I checked the settings file, notebook disconnect is set at 10 seconds, which corresponds to the period you're observing.
We need to determine what code is called that requires DB access.
Could you please turn on the debug log in CN and record several such events?
This would definitely shed light on the issue.
Thanks!


Made a log: https://yadi.sk/i/GtMKHiZqxPazeA
User avatar
CintaNotes Developer
Site Admin
Posts: 5001
Joined: Fri Dec 12, 2008 4:45 pm
Contact:

Re: File database is locked

Postby CintaNotes Developer » Thu Mar 21, 2019 7:35 pm

Thanks a lot! According to the log, database disconnect never happens.
Most probably this is because the program is kept on screen and is never minimized to tray.
When the program is on screen, it keeps database locked to prevent database reconnection freeze when the user switches back to it.
Alex

Return to “CintaNotes Personal Notes Manager”