Re: [fossil-users] database locked on sync
On 08/06/11 12:47, Kevin Quick wrote: $ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ This happens every time. I found the suggestion for PRAGMA journal_mode=WAL; in sqlite mode, but that had no effect. Actually, I've found that that happens when you have/try to open the same .fossil multiple times? I.e. I have a server (fossil server ...) on host server; I use clients typically on boxens clientX (for X in ...); The procedure always was: - fossil clone http://user@server:port/repo ~/open/repo.fossil - mkdir ~/open/repo - cd ~/open/repo - fossil open ~/open/repo.fossil - setup fossil remote-url (again;so that fossil actually asks for the pwd). No problem ever. Auto-sync in all directions works charms. But when I open the original fossil on server (say, it's lying in ~/fossilien, so I do: - mkdir ~/open/repo - cd ~/open/repo - fossil open ~/fossilien/repo.fossil ) the open works fine, but any sync / update / whatever afterwards either comes up with COMMIT : DB locked or the sql you have above: DB locked. If, on the other hand, on the server, I replicate the clientX approach (that is, fossil clone http://user@localhost:port/repo ~/open/repo.fossil; fossil open repo.fossil) everything is fine. So I think it's an issue with having file:/// level access open to a fossil repository multiple times / from multiple fossil instances? I'm just fishing the muddy waters here, but it's pretty obvious how to force the Database error: database is locked to appear to me. Regards, -Martin ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
On Mon, Aug 08, 2011 at 03:36:29PM -0400, Martin S. Weber wrote: On 08/06/11 12:47, Kevin Quick wrote: $ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ This happens every time. I found the suggestion for PRAGMA journal_mode=WAL; in sqlite mode, but that had no effect. So I think it's an issue with having file:/// level access open to a fossil repository multiple times / from multiple fossil instances? I'm just fishing the muddy waters here, but it's pretty obvious how to force the Database error: database is locked to appear to me. I have fossil repositories opened in multiple directories each, and I only hit database locked troubles if I'm really running at the same time two fossil operations on the same repository. So, I don't understand what happens in your situation. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
2011/8/8 Lluís Batlle i Rossell virik...@gmail.com I have fossil repositories opened in multiple directories each, and I only hit database locked troubles if I'm really running at the same time two fossil operations on the same repository. So, I don't understand what happens in your situation. He's running a server on that same repo concurrently, and the server apparently locks the db for its whole life. The workaround is simply to use HTTP over localhost. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
On 08/08/11 16:16, Stephan Beal wrote: 2011/8/8 Lluís Batlle i Rossell virik...@gmail.com mailto:virik...@gmail.com I have fossil repositories opened in multiple directories each, and I only hit database locked troubles if I'm really running at the same time two fossil operations on the same repository. So, I don't understand what happens in your situation. He's running a server on that same repo concurrently, and the server apparently locks the db for its whole life. The workaround is simply to use HTTP over localhost. Actually, there seems to be more at play here. I tried replicating the problem on a toy (empty) repo, but failed. I mean I know how to handle myself (now ;)) without facing problems; if I succeed in having a nice clinical test-case that exhibits the same problems I'll let you know. Regards, -Martin ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] database locked on sync
$ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ This happens every time. I found the suggestion for PRAGMA journal_mode=WAL; in sqlite mode, but that had no effect. Another (perhaps related) problem I'm having is that I created the repo in one location and then moved it elsewhere. The checked out branch kept complaining about syncing with the original location, but I was able to change that by specifying the new location on the command line. However, I later discovered in the repository directory there were a number of repo-NN-in.http and repo-NN-out.http files. The -in.http files contained p class=generalErrorrepository does not exist or is in an unreadable directory: ORIGINAL-PATH/p. I don't know if this is related to the database locked message above. This is fossil version [d8221b9863] 2011-05-12 14:56:52 UTC Suggestions? -- -KQ ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
On Sat, Aug 06, 2011 at 09:47:10AM -0700, Kevin Quick wrote: $ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ I think you may need to 'close' (or remove _FOSSIL_) and 'open' again your repository, if you moved things. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
If I do that I'll lose all changes in the local __FOSSIL__ that I haven't sync'd to the database. I think rebuilding the local __FOSSIL__ that way and losing all those changes is my fix of last resort, but I'm hoping for a more direct and less lossy repair. :-) -KQ On Sat, 06 Aug 2011 10:04:32 -0700, Lluís Batlle i Rossell virik...@gmail.com wrote: On Sat, Aug 06, 2011 at 09:47:10AM -0700, Kevin Quick wrote: $ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ I think you may need to 'close' (or remove _FOSSIL_) and 'open' again your repository, if you moved things. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
On Sat, Aug 06, 2011 at 10:09:33AM -0700, Kevin Quick wrote: If I do that I'll lose all changes in the local __FOSSIL__ that I haven't sync'd to the database. I think rebuilding the local __FOSSIL__ that way and losing all those changes is my fix of last resort, but I'm hoping for a more direct and less lossy repair. :-) -KQ The changes are not in _FOSSIL_. _FOSSIL_ only keeps the things you can undo, renames, your current checkout and little more. The already committed changes are in 'the database', and the modifications not committed, are in your working directory. Thus, maybe 'fossil open -keep' can help. But I never tried it. On Sat, 06 Aug 2011 10:04:32 -0700, Lluís Batlle i Rossell virik...@gmail.com wrote: On Sat, Aug 06, 2011 at 09:47:10AM -0700, Kevin Quick wrote: $ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ I think you may need to 'close' (or remove _FOSSIL_) and 'open' again your repository, if you moved things. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
On Sat, Aug 6, 2011 at 12:47 PM, Kevin Quick qu...@sparq.org wrote: Another (perhaps related) problem I'm having is that I created the repo in one location and then moved it elsewhere. If you have an open checkout and you move the repository file, then the open check-out won't be able to find the repository any more. The best solution is to not move the repo while you have an open checkout. If you want to try to fix the open checkout, you can use an SQLite command-line shell to edit the _FOSSIL_ (or .fos) database file. Change the value of the row in the VVAR table that has NAME='repository'. -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
Lluis, Ahh, I didn't know that about _FOSSIL_... I had assumed it was similar to a _darcs or .hg repo. I tried your suggestion (I didn't use the -keep flag) and it seemed to work fine from the perspective of not modifying my working directory and all timeline events were still there. However, it didn't fix the problem. I still get the database is locked error on fossil sync. -KQ On Sat, 06 Aug 2011 10:24:18 -0700, Lluís Batlle i Rossell virik...@gmail.com wrote: On Sat, Aug 06, 2011 at 10:09:33AM -0700, Kevin Quick wrote: If I do that I'll lose all changes in the local __FOSSIL__ that I haven't sync'd to the database. I think rebuilding the local __FOSSIL__ that way and losing all those changes is my fix of last resort, but I'm hoping for a more direct and less lossy repair. :-) -KQ The changes are not in _FOSSIL_. _FOSSIL_ only keeps the things you can undo, renames, your current checkout and little more. The already committed changes are in 'the database', and the modifications not committed, are in your working directory. Thus, maybe 'fossil open -keep' can help. But I never tried it. On Sat, 06 Aug 2011 10:04:32 -0700, Lluís Batlle i Rossell virik...@gmail.com wrote: On Sat, Aug 06, 2011 at 09:47:10AM -0700, Kevin Quick wrote: $ fossil sync PATH-TO-REPO Bytes Cards Artifacts Deltas Sent:3897 82 0 0 Error: Database error: database is locked DELETE FROM unclustered WHERE rid IN (SELECT rid FROM private) Received: 118 1 0 0 Total network traffic: 2225 bytes sent, 813 bytes received $ I think you may need to 'close' (or remove _FOSSIL_) and 'open' again your repository, if you moved things. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
Thanks, Richard, but I still need to buy a clue: I cannot find a VVAR table and none of the tables (revealed by .table) have a name field containing 'repository'. -KQ On Sat, 06 Aug 2011 10:25:33 -0700, Richard Hipp d...@sqlite.org wrote: On Sat, Aug 6, 2011 at 12:47 PM, Kevin Quick qu...@sparq.org wrote: Another (perhaps related) problem I'm having is that I created the repo in one location and then moved it elsewhere. If you have an open checkout and you move the repository file, then the open check-out won't be able to find the repository any more. The best solution is to not move the repo while you have an open checkout. If you want to try to fix the open checkout, you can use an SQLite command-line shell to edit the _FOSSIL_ (or .fos) database file. Change the value of the row in the VVAR table that has NAME='repository'. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] database locked on sync
And now I'm finally realizing the extension of what you implied: I was assuming I would need to issue a fossil sync to synchronize my working directory with the repository database (similar to mercurial or darcs). But it now occurs to me that all of my commits have already done that and sync is trying to synchronize my *repository* file against a remote repository... which is not necessary for my present activities. And the database is locked is most likely occurring because I'm trying to sync the repository against itself. So it's really a case of the wrong mental model of what fossil does. I should be better now! :-) Thanks! -KQ On Sat, 06 Aug 2011 10:49:03 -0700, Kevin Quick qu...@sparq.org wrote: Lluis, Ahh, I didn't know that about _FOSSIL_... I had assumed it was similar to a _darcs or .hg repo. I tried your suggestion (I didn't use the -keep flag) and it seemed to work fine from the perspective of not modifying my working directory and all timeline events were still there. However, it didn't fix the problem. I still get the database is locked error on fossil sync. -KQ On Sat, 06 Aug 2011 10:24:18 -0700, Lluís Batlle i Rossell virik...@gmail.com wrote: On Sat, Aug 06, 2011 at 10:09:33AM -0700, Kevin Quick wrote: snip The changes are not in _FOSSIL_. _FOSSIL_ only keeps the things you can undo, renames, your current checkout and little more. The already committed changes are in 'the database', and the modifications not committed, are in your working directory. Thus, maybe 'fossil open -keep' can help. But I never tried it. snip ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users