Closed flancast90 closed 2 years ago
Try removing
const db = new AceBase('db');
Otherwise you are creating/accessing the same database named 'db' on disk multiple times simultaneously, which requires special coordination.
I tried both with and without that line, and got the same issue either way. Any other ideas?
On Mon, Jul 25, 2022 at 10:03 PM Don @.***> wrote:
Try removing
const db = new AceBase('db');
Otherwise you are creating/accessing the same database named 'db' on disk multiple times simultaneously, which requires special coordination.
— Reply to this email directly, view it on GitHub https://github.com/appy-one/acebase-server/issues/27#issuecomment-1194885548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR2EVEEBIWLEL3BLGP4IOQLVV5BNNANCNFSM54FYQGJQ . You are receiving this because you authored the thread.Message ID: @.***>
It looks like you may have corrupted the database file by accessing (writing to) it from both an AceBaseServer
and local AceBase
db instance, I posted about this a while ago in the discussion "How to protect your database from corruption".
If the data you stored in the db is important, I might be able to help you recover the data. If it only has dev/test data, I recommend removing it and starting over with a fresh db. Make sure you only let a single AceBaseServer
instance access the database files, or configure an acebase-ipc-server to setup a cluster.
I tried using only one of the instances and deleting the existing db to allow it to create a fresh one, with the same issue. In terms of recovery, I never actually got it to work, so there was no data in it.
On Tue, Jul 26, 2022 at 3:14 PM Ewout Stortenbeker @.***> wrote:
It looks like you may have corrupted the database file by accessing (writing to) it from both an AceBaseServer and local AceBase db instance, I posted about this a while ago in the discussion "How to protect your database from corruption" https://github.com/appy-one/acebase/discussions/48.
If the data you stored in the db is important, I might be able to help you recover the data. If it only has dev/test data, I recommend removing it and starting over with a fresh db. Make sure you only let a single AceBaseServer instance access the database files, or configure an acebase-ipc-server https://github.com/appy-one/acebase-ipc-server to setup a cluster.
— Reply to this email directly, view it on GitHub https://github.com/appy-one/acebase-server/issues/27#issuecomment-1195879825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR2EVEARWLLBNI46GDX3LHDVWA2IVANCNFSM54FYQGJQ . You are receiving this because you authored the thread.Message ID: @.***>
Alright, you'll have to provide more code to reproduce this then. Only importing AceBaseServer
and instantiating it with a new db does not cause any issues in my tests?
I'm closing this issue for now. If you have more info about how to reproduce this, feel free to reopen!
Hi, I've begun migrating my project to AceBase, and while the regular AceBase library works fine, as soon as I attempt to integrate with AceBase-Server, I get an error (see bottom of issue). Mainly, I'm confused as to how the code should look (e.g. do I need both an AceBase and AceBase-server instance)?
The issue is probably just an issue with how I've imported everything, so I'd appreciate some guidance on how to fix :)
My Code:
Error Message: