question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connecting to a starting EdgeDB server will stop without throwing

See original GitHub issue

Steps to reproduce:

  1. Create a js script that connects to EdgeDB:
const edgedb = require('edgedb');

async function main() {
  try {
    let c = await edgedb.connect({
      user: 'edgedb',
      host: '127.0.0.1',
    });
    console.log('connected');
  } catch (e) {
    console.error('caught', e);
  }
}

main();
  1. Launch edgedb server (I used docker version).
  2. Run the js script above before the server is fully launched

Actual result

Script stops

Expected result

An error should be caught

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
gsoufcommented, Jun 22, 2020

@1st1 I believe I was using node 10.x

0reactions
jaclarkecommented, Nov 24, 2021

I believe this issue is fixed in the latest versions. The createClient() API (connect() is deprecated now) accepts a waitUntilAvailable option (defaults to 30s), and will retry attempts to connect for that time before failing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

edgedb instance stop
edgedb instance stop is a terminal command for stopping a running EdgeDB instance. This is a necessary step before destroying an instance.
Read more >
Client API Reference — Dart | EdgeDB Docs
Represents a pool of connections to the database, provides methods to run queries and manages the context in which queries are run (ie....
Read more >
EdgeDB Release Candidate 2
EdgeDB 1.0 Release Candidate 2 is now available. Bugs are fixed, documentation is polished, and our client libraries get a facelift.
Read more >
Quickstart — Get Started | EdgeDB Docs
This quickstart will walk you through the entire process of creating a simple EdgeDB-powered application: installation, defining your schema, adding some data, ...
Read more >
Network usage — CLI | EdgeDB Docs
Generally command-line tools connect only to the database host. But there are two exceptions: When the command-line tool starts, it checks if its...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found