-
Notifications
You must be signed in to change notification settings - Fork 60
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
Scanner uses too many connections #169
Comments
The error you posted happens after the scan? By the look of the stack trace it seems to be raised as soon as you invoke the CLI. The connections are handled by PonyORM and unfortunately there is no way to directly control how many connections it can create. |
it appeared after scanning 239 files: at that point it crashed and stopped. I was using the CLI, without the daemon. Postgresql is running on Ubuntu 18.04 LTS, like supysonic. I have I'm not sure how many files it would be able to scan without exhausting more connections. If I set max_connections to 256, scan dies after 251 files due to:
|
Hi! The scanning itself only uses one connection (or reuse an unused one since they are pooled). Running the daemon might use, under certain circumstances, a few connections (since it's threaded) but it shouldn't spawn an indecent number. And finally, a new connection might be opened by the webserver each time a new request arrives (and will be closed thereafter). |
It seems like it exceeds the connection limit and dies. There should be a configurable limit to the number of connections it's allowed to create, and it should close them as soon as they're not needed anymore. Here's an example stacktrace (db is postgresql) after scanning 239 files:
The text was updated successfully, but these errors were encountered: