N
Neon2y ago
ambitious-aqua

How many Connections can I make with your database?

I'm making a discord bot. I want to connect to same database using Python asyncpg 2 times
11 Replies
ambitious-aqua
ambitious-aquaOP2y ago
1 -> Main bot connected to Database 2 -> Other bot connected to Database so that both can access the data . @Daniel
multiple-amethyst
multiple-amethyst2y ago
Hey @AnnoMy. There's a table here that shows the max concurrent connection limit per compute size. https://neon.tech/docs/manage/endpoints#how-to-size-your-compute Unless I'm missing something, multiple connections to the same database should not be an issue.
Neon
Manage computes - Neon Docs
A single read write compute endpoint is created for your project's primary branch, by default. To connect to a database that resides in a branch, you must connect via a compute endpoint associated wit...
ambitious-aqua
ambitious-aquaOP2y ago
Okay. Why my both dbs occupy 7MiB of storage where as I only have 2 tables with 0 rows @Conrad Ludgate
exotic-emerald
exotic-emerald2y ago
That seems expected to me. Is this an issue?
ambitious-aqua
ambitious-aquaOP2y ago
Not but it occupies my space
ambitious-aqua
ambitious-aquaOP2y ago
I doesn't interrupt but occupies my space How can this be fixed
exotic-emerald
exotic-emerald2y ago
Hey @ShinyPokemon , can you help out here?
fair-rose
fair-rose2y ago
@AnnoMy. by default Postgres uses some storage for it's initial footprint. For example a Postgres running on my laptop already uses similar storage to your nendb:
psql (15.6 (Debian 15.6-1.pgdg120+2))
Type "help" for help.

postgres=# select pg_size_pretty (pg_database_size('main'));
pg_size_pretty
----------------
7469 kB
(1 row)

postgres=# select pg_size_pretty (pg_database_size('postgres'));
pg_size_pretty
----------------
7453 kB
(1 row)
psql (15.6 (Debian 15.6-1.pgdg120+2))
Type "help" for help.

postgres=# select pg_size_pretty (pg_database_size('main'));
pg_size_pretty
----------------
7469 kB
(1 row)

postgres=# select pg_size_pretty (pg_database_size('postgres'));
pg_size_pretty
----------------
7453 kB
(1 row)
We also have history retention enabled (https://neon.tech/docs/introduction/point-in-time-restore#history-retention) which uses up storage too. If you don't need point-in-time-restore you can disable history retention to reduce storage consumption.
Neon
Branch reset and restore - Neon Docs
Neon retains a history of changes for all branches. This shared history provides the basis for a variety of branch restore and reset operations resetting a branch to its parent, restoring a branch to ...
ambitious-aqua
ambitious-aquaOP2y ago
Okay thank you.

Did you find this page helpful?