How to cleanly exit a headless instance of Mnemosyne?

31 views
Skip to first unread message

Marcin Mielniczuk

unread,
Oct 14, 2018, 7:46:26 AM10/14/18
to mnemosyne-...@googlegroups.com
I once tried running mnemosyne as `mnemosyne --sync-server` on a
headless server. When I was done, I just killed it by ctrl+c, which
corrupted the database (or did something else that prevented subsequent
syncs)

What's the correct way of exiting a headless instance of Mnemosyne?

Peter Bienstman

unread,
Oct 15, 2018, 4:25:52 AM10/15/18
to mnemosyne-...@googlegroups.com
Hi,

That's the correct way, but obviously if you kill the server in the middle of an ongoing sync, it will require a full sync the next time.

Killing headless servers when there's no sync in progress should be harmless, I do this all the time.

Cheers,

Peter
--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/1b474f32-8282-5468-02eb-6e4126645152%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Marcin M.

unread,
Oct 15, 2018, 12:40:59 PM10/15/18
to mnemosyne-proj-users
I think I used the keyboard interrupt while the sync has already been finished. Maybe a keyboard-interrupt exit causes some cleanup/flushing to be skipped?


On Monday, October 15, 2018 at 10:25:52 AM UTC+2, Peter Bienstman wrote:
Hi,

That's the correct way, but obviously if you kill the server in the middle of an ongoing sync, it will require a full sync the next time.

Killing headless servers when there's no sync in progress should be harmless, I do this all the time.

Cheers,

Peter

-----Original Message-----
From: mnemosyne-...@googlegroups.com <mnemosyne-...@googlegroups.com> On Behalf Of Marcin Mielniczuk
Sent: 14 October 2018 13:47
To: mnemosyne-...@googlegroups.com
Subject: [mnemosyne-proj-users] How to cleanly exit a headless instance of Mnemosyne?

I once tried running mnemosyne as `mnemosyne --sync-server` on a headless server. When I was done, I just killed it by ctrl+c, which corrupted the database (or did something else that prevented subsequent
syncs)

What's the correct way of exiting a headless instance of Mnemosyne?

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-users+unsub...@googlegroups.com.

Peter Bienstman

unread,
Oct 16, 2018, 3:09:46 AM10/16/18
to mnemosyne-...@googlegroups.com

I looked again the code, and normally the saving of the database should happen at the end of the sync (by the client calling get_sync_finish), not upon graceful exit of the program.

 

Is this reproducible?

 

Peter

 

From: mnemosyne-...@googlegroups.com [mailto:mnemosyne-...@googlegroups.com] On Behalf Of Marcin M.
Sent: 15 October 2018 18:41
To: mnemosyne-proj-users <mnemosyne-...@googlegroups.com>
Subject: Re: [mnemosyne-proj-users] How to cleanly exit a headless instance of Mnemosyne?

 

I think I used the keyboard interrupt while the sync has already been finished. Maybe a keyboard-interrupt exit causes some cleanup/flushing to be skipped?

On Monday, October 15, 2018 at 10:25:52 AM UTC+2, Peter Bienstman wrote:

Hi,

That's the correct way, but obviously if you kill the server in the middle of an ongoing sync, it will require a full sync the next time.

Killing headless servers when there's no sync in progress should be harmless, I do this all the time.

Cheers,

Peter

-----Original Message-----
From: mnemosyne-...@googlegroups.com <mnemosyne-...@googlegroups.com> On Behalf Of Marcin Mielniczuk
Sent: 14 October 2018 13:47
To: mnemosyne-...@googlegroups.com
Subject: [mnemosyne-proj-users] How to cleanly exit a headless instance of Mnemosyne?

I once tried running mnemosyne as `mnemosyne --sync-server` on a headless server. When I was done, I just killed it by ctrl+c, which corrupted the database (or did something else that prevented subsequent
syncs)

What's the correct way of exiting a headless instance of Mnemosyne?

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.

--

You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.


To post to this group, send email to mnemosyne-...@googlegroups.com.

Marcin Mielniczuk

unread,
Oct 22, 2018, 1:04:10 PM10/22/18
to mnemosyne-...@googlegroups.com, Peter Bienstman

Yes. The error is:

Error: mismatched user ids.

You received this message because you are subscribed to a topic in the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mnemosyne-proj-users/XMmWlQtggto/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mnemosyne-proj-u...@googlegroups.com.

To post to this group, send email to mnemosyne-...@googlegroups.com.

Peter Bienstman

unread,
Oct 23, 2018, 9:38:56 AM10/23/18
to Marcin Mielniczuk, mnemosyne-...@googlegroups.com

What happens if you add ‘self.save()’ to the end of configuration.py:change_user_id(self, new_user_id)?

 

Peter.

Marcin Mielniczuk

unread,
Oct 25, 2018, 9:27:58 AM10/25/18
to Peter Bienstman, mnemosyne-...@googlegroups.com

The change fixes the issue.

Peter Bienstman

unread,
Oct 25, 2018, 9:43:07 AM10/25/18
to Marcin Mielniczuk, mnemosyne-...@googlegroups.com

Great, this will be in the next release.

 

Peter

 

From: Marcin Mielniczuk <marmis...@gmail.com>
Sent: 25 October 2018 15:28
To: Peter Bienstman <Peter.B...@UGent.be>; mnemosyne-...@googlegroups.com
Subject: Re: [mnemosyne-proj-users] How to cleanly exit a headless instance of Mnemosyne?

 

The change fixes the issue.

Reply all
Reply to author
Forward
0 new messages