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

Public sqlite db options: MaxOpenConns, MaxIdleConns, ConnMaxLifetime. #310

Merged
merged 5 commits into from
Jan 25, 2022
Merged

Conversation

iredmail
Copy link
Contributor

@iredmail iredmail commented Jan 25, 2022

Default settings of maxOpenConns (100) and connMaxLifetime is not always good, so please allow to customize them. :)

We set max open connection to 1 to avoid the SQLITE_BUSY error.

@ReneWerner87
Copy link
Member

@iredmail don´t forget the README file
https://github.com/gofiber/storage/blob/main/sqlite3/README.md

and the doc comments above the properties (only a known feature is a good feature)

@iredmail
Copy link
Contributor Author

@ReneWerner87 Updated. :)

@ReneWerner87
Copy link
Member

@iredmail

// //////////////////////////////////
	// Adaptor related config options //
	// //////////////////////////////////

	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifetime time.Duration
	

don't really like this block, when it was internal it went through for me, but now that we offer it in config for customization

we should describe each property individually, with default value and effect/use

@ReneWerner87 ReneWerner87 merged commit ff1db4e into gofiber:main Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants