mozilla-services / syncserver

Run-Your-Own Firefox Sync Server
Mozilla Public License 2.0
1.87k stars 145 forks source link

Use a persistent sqlite db by default, rather than in-memory one. #4

Closed rfk closed 10 years ago

rfk commented 10 years ago

Let's use ./syncserver.db as the default database, rather than an in-memory sqlite store. This will be less confusing all round and may help with some strangeness we're seeing with the in-memory db (issue #2).

This change assumes write access to the root checkout directory, but that's highly likely for an initial dev deployment. The umask is set to ensure that the db gets sensible permissions when it's created.

rfk commented 10 years ago

@callahad please try this alternative and see if it resolves #2 for you.

callahad commented 10 years ago

I'll double check with just this patch, but my most recent attempt used both the single threaded server and an actual file for the sqlite database.

My plan is to switch to Postgres today and see what happens.

callahad commented 10 years ago

Actually, I'm completely perplexed now. This patch appears to work.

(Switching to MySQL also Just Works)

rfk commented 10 years ago

strange; thanks for trying it out, I'll merge it in since it seems like a good idea even if the original bug still shows up again