Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: connection pool example #38

Open
mblarsen opened this issue Aug 29, 2024 · 3 comments
Open

Question: connection pool example #38

mblarsen opened this issue Aug 29, 2024 · 3 comments

Comments

@mblarsen
Copy link

mblarsen commented Aug 29, 2024

The README prescribes a way to to handle connection pool limitation https://github.com/lpil/pgo?tab=readme-ov-file#atom-generation

Does a sample application exist that shows how this could work?

@lpil
Copy link
Owner

lpil commented Aug 29, 2024

How what would work, sorry?

@mblarsen
Copy link
Author

mblarsen commented Sep 9, 2024

Sorry for just posting a link. I was thinking about this part:

Atom generation

Creating a connection pool with the pgo.connect function dynamically generates an Erlang atom. Atoms are not garbage collected and only a certain number of them can exist in an Erlang VM instance, and hitting this limit will result in the VM crashing. Due to this limitation you should not dynamically open new connection pools, instead create the pools you need when your application starts and reuse them throughout the lifetime of your program.

@lpil
Copy link
Owner

lpil commented Sep 9, 2024

I don't know what you're asking I'm afraid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants