Implement SQL connection pool #2

Closed
nutomic wants to merge 0 commits from nutomic:sql-connection-pool into master
Owner

Depends on #1

I couldnt install ab locally because https://aur.archlinux.org/ is down (and I dont want to install all of apache), but I'm certain that this fixes the performance problem I mentioned.

Btw is it normal that all of my PRs have huge diffs in Cargo.lock, or should I exclude that?

Depends on #1 I couldnt install ab locally because https://aur.archlinux.org/ is down (and I dont want to install all of apache), but I'm certain that this fixes the performance problem I mentioned. Btw is it normal that all of my PRs have huge diffs in Cargo.lock, or should I exclude that?
Owner

Damn nice! I just added r2d2 to another rust project, I have no idea why I didn't add it to this one. This looks great tho.

1 question, with the ConnectionManager, is it correct to just let it alone, or add a specific number of connections for the pool? We can always tweak later if we don't know the answer.

Damn nice! I just added r2d2 to another rust project, I have no idea why I didn't add it to this one. This looks great tho. 1 question, with the `ConnectionManager`, is it correct to just let it alone, or add a specific number of connections for the pool? We can always tweak later if we don't know the answer.
Author
Owner

The docs say it uses a maximum of 10 connections by default.

https://docs.diesel.rs/diesel/r2d2/struct.Builder.html#method.max_size

The docs say it uses a maximum of 10 connections by default. https://docs.diesel.rs/diesel/r2d2/struct.Builder.html#method.max_size
Author
Owner

Added a config option for the sql pool size, with the same default that is used by Peertube.

Added a config option for the sql pool size, with the same default that is used by Peertube.
Author
Owner

I added a new commit with comments in the config, didnt want to open a new pr. Please check that change, especially the part about rate limits is kind of confusing, and i dont know if i understood the jwt token correctly.

I added a new commit with comments in the config, didnt want to open a new pr. Please check that change, especially the part about rate limits is kind of confusing, and i dont know if i understood the jwt token correctly.
nutomic added a new dependency 2019-12-17 16:43:50 +00:00
nutomic added a new dependency 2019-12-17 21:37:22 +00:00
nutomic closed this pull request 2019-12-28 22:10:57 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: LemmyNet/lemmy#2
No description provided.