Using SurrealDB?

SurrealDB dropping data or aborting transactions? We clear the backlog.

SurrealDB is a young database wearing many hats: document, graph, and relational in one engine with its own query language. That ambition shows up both in the useful ways and in rough edges around schemafull migrations, transaction handling and silent type coercion. We find the edge you are hitting and either work around it or write the migration path.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

surreal-db.log

still failing

What it is

SurrealDB at a glance

SurrealDB is a multi-model database written in Rust that lets a single query touch document data, graph edges and relational joins through SurrealQL, its own SQL-flavored language. It can run embedded, as a single server, or in a distributed cluster backed by TiKV.

The project is maintained by Surreal DB Ltd. with an open-source core under the Business Source License, which converts to Apache 2.0 after a delay. Typical use cases include real-time applications, graph-heavy domains, and backends where the team wants one engine rather than Postgres plus Neo4j plus Redis glued together.

Type
Multi-model database with document, graph and relational semantics
First released
2022 public release
License
Business Source License 1.1, converting to Apache 2.0 over time
Maintained by
Surreal DB Ltd.
Typically used for
Real-time apps, graph-heavy domains, consolidated backends for small teams

The honest version

SurrealDB pros and cons

No technology is all upside. This is where SurrealDB earns its place and where it tends to cause trouble.

Where SurrealDB is strong

  • One engine instead of threeSurrealQL covers document, graph and relational patterns in one language, which shrinks the number of systems a small team has to run and reason about.
  • Record links and graph edges are first classRELATE statements and record<type> fields describe relationships without the join gymnastics a pure document store forces or the second database a relational schema would need.
  • Embedded or distributed, same APIThe same SurrealQL runs against an in-memory engine, a single binary, or a TiKV-backed cluster, which makes local development and scaling feel like one product.
  • Live queries built inSELECT statements can stay open and stream changes back to the client, so real-time features do not need a separate pub/sub layer in front of the database.
  • Permissions scope per recordRow-level permissions and scoped authentication are part of the schema rather than bolted on in application code, which keeps authorization logic auditable.
  • Active and improvingThe release cadence is quick and the roadmap is public, so pain points usually have a visible timeline rather than disappearing into a backlog forever.

Where SurrealDB bites

  • Still maturing in productionEdge cases around transaction cancellation, schemafull migrations and type coercion show up in ways older databases have long since smoothed out. Teams that need boring stability should know this up front.
  • Silent data drops are possibleA SCHEMAFULL field typed as object without the FLEXIBLE keyword accepts inserts and discards nested keys without warning, which is the kind of problem that only surfaces during a bug hunt weeks later.
  • SurrealQL is its own dialectIt reads like SQL but the differences matter, and there are very few people on the hiring market who already know it well.
  • Migration tooling is thinThird-party migration runners exist but the ecosystem is small, and some runners record migrations as applied even after SurrealDB aborts the underlying transaction, which is a trap to watch for.
  • BSL license has strings attachedThe Business Source License is permissive for most uses but blocks offering SurrealDB as a competing hosted product, which legal teams flag during review.
  • Observability is underdevelopedTracing a slow query or a stuck live subscription still means reading logs and reasoning about the engine, rather than opening a dashboard the way you would for Postgres.

Sound familiar?

Common SurrealDB problems we fix

The SurrealDB problems that bring people to us, and what you have once each one is fixed.

Found NONE for field `email`

Schemafull inserts rejected after a change

A new required field added to a SCHEMAFULL table and existing rows failing validation, with writes blocked until every old row either gets backfilled or the field is made optional.

Schema change migrated cleanly

SCHEMAFULL TYPE object silently discarded nested keys

Data arrives in SurrealDB but nested keys vanish

An object field defined without FLEXIBLE accepting the top-level write and quietly throwing away the inner keys, which is invisible until a read returns surprising nulls.

Field marked FLEXIBLE or schema widened

Transaction cancelled due to a failed statement

A whole transaction rolls back from one bad statement

Any statement inside a BEGIN/COMMIT block that fails cancels everything, and migration runners that do not inspect the response may record the migration as applied anyway.

Transaction behaviour understood and handled

Migration recorded as applied even though transaction aborted

Migrations drift without anyone noticing

The runner stores the migration ID even though SurrealDB rolled the work back, so later runs skip a change that never happened and later schema queries fail without an obvious cause.

Migration log reconciled with the actual schema

Permission denied on scope `user`

Scope authentication is blocking valid access

Row-level permissions on a scoped table rejecting a SELECT because the predicate referenced a field the scope cannot see, or the token has expired without the client refreshing.

Scope and permissions corrected

connecting to the storage engine

The storage backend cannot be reached

A SurrealDB server configured to use TiKV, RocksDB or SurrealKV that cannot talk to its backing store, so the whole database refuses connections until the storage layer is healthy again.

Storage engine reachable, server healthy

live query stopped receiving events

Live queries silently stop updating

A WebSocket that disconnected and reconnected without the subscription being re-registered, leaving the client believing it is live when the database is no longer pushing it changes.

Live subscriptions resilient to reconnects

What we do

SurrealDB help, from rescue to real deployments

Call us for one failed migration, or hand us the data model and the production cluster that runs it.

Rescue
A transaction that keeps cancelling, a migration that will not apply, or a scope that refuses to authenticate. We trace it from the logs and settle it.
Schema and modeling review
Tables, record links, assertions and permissions reviewed against the application's real read and write patterns, with silent-drop traps flagged.
Migration runner hardening
Transaction handling fixed so applied migrations actually reflect the schema state, plus dry-run and rollback paths that match production behaviour.
Production topology
TiKV backing, backups, replication and client reconnection for live queries configured for the uptime target you need, not the quickstart defaults.
Postgres and Mongo migrations
Moving from a relational or document store into SurrealDB without losing referential integrity, including RELATE wiring for what used to be join tables.
Managed Tech
Backups verified by restore, release upgrades rehearsed against your schema, and a human on the end of the phone when the live-query feed goes quiet.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running SurrealDB alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

SurrealDB questions

Something else? Call+1 737 727 7327

Is SurrealDB ready for production?

For the right workload, yes; for a mission-critical bank ledger, we would hesitate. Teams using it in production usually have smaller, well-bounded datasets, in-house SurrealQL knowledge, and the willingness to upgrade on the project's release cadence. If any of those is missing, Postgres plus a graph extension is often the safer call.

How do we handle schemafull migrations safely?

Add fields as optional first, backfill existing rows, then tighten the type. Test every migration against a production-shaped copy of the data because SurrealDB's assertions fail hard rather than warning. Use a runner that actually inspects the transaction response rather than assuming success.

Can we mix document and graph queries efficiently?

Yes, that is the pitch, and it mostly works. RELATE edges and record<type> fields let a single SurrealQL query walk a graph and pull nested documents back, though complex multi-hop queries still benefit from thinking about indexes and the shape of the result set.

What about backups and point-in-time recovery?

SurrealDB can export to a file, and distributed deployments on TiKV inherit TiKV's snapshot model. Point-in-time recovery is less mature than mainstream databases, so we usually recommend frequent exports and streaming WAL to object storage for anything you cannot afford to lose.

How much does SurrealDB help cost?

The quote itself is free. Describe the data model, the issue you are stuck on, and the production target, and we come back with a price before any work begins.

Free estimate

SurrealDB giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.