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

Close DB after each model generation #235

Merged
merged 1 commit into from
May 24, 2018
Merged

Conversation

rhertogh
Copy link
Contributor

Each new app instance will open a new database connection, when generating a lot of models this causes a "Too many connections" error.
This PR closes the database of the temp app before unloading it (which does not automatically closes the db connection).

Each new app instance will open a new database connection, when generating a lot of models this causes a "Too many connections" error.
@schmunk42 schmunk42 merged commit f5a1a47 into schmunk42:master May 24, 2018
@schmunk42
Copy link
Owner

Thank you!

handcode added a commit to handcode/yii2-giiant that referenced this pull request Jul 20, 2022
…nnections'

This patch fixes the 'too many connection' problem that was partially
fixed in schmunk42#235 and schmunk42#276 but still exists if the application has other open DB connections
in addition to the known modelDB.
handcode added a commit to handcode/yii2-giiant that referenced this pull request Jul 20, 2022
This patch fixes the 'too many connection' problem that was partially
fixed in schmunk42#235 and schmunk42#276 but still exists if the application has other open DB connections
in addition to the known modelDB.
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

Successfully merging this pull request may close these issues.

2 participants