You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting a high db pool size causes various sql query errors, most notably logins failing entirely. To fix it, shared memory for postgres needs to be increased with the following line in docker-compose.yml. This should be documented, but not sure where it fits.
Logins on lemmy.ml are consistently failing with known working user/password. Server logs show the following error:
lemmy_1 | 2023-07-26T12:52:38.922771Z WARN lemmy_server::root_span_builder: incorrect_login: could not resize shared memory segment "/PostgreSQL.1513506408" to 220224 bytes: No space left on device
lemmy_1 | 0: lemmy_api::local_user::login::perform
lemmy_1 | with self=Login { username_or_email: Sensitive, password: Sensitive, totp_2fa_token: None }
lemmy_1 | at crates/api/src/local_user/login.rs:16
lemmy_1 | 1: lemmy_server::root_span_builder::HTTP request
lemmy_1 | with http.method=POST http.scheme="http" http.host=lemmy.ml http.target=/api/v3/user/login otel.kind="server" request_id=1853cb5f-c9c7-4794-bf02-4bbef2ed5c41
lemmy_1 | at src/root_span_builder.rs:16
lemmy_1 | LemmyError { message: Some("incorrect_login"), inner: could not resize shared memory segment "/PostgreSQL.1513506408" to 220224 bytes: No space left on device, context: SpanTrace [{ target: "lemmy_api::local_user::login", name: "perform", fields: "self=Login { username_or_email: Sensitive, password: Sensitive, totp_2fa_token: None }", file: "crates/api/src/local_user/login.rs", line: 16 }, { target: "lemmy_server::root_span_builder", name: "HTTP request", fields: "http.method=POST http.scheme=\"http\" http.host=lemmy.ml http.target=/api/v3/user/login otel.kind=\"server\" request_id=1853cb5f-c9c7-4794-bf02-4bbef2ed5c41", file: "src/root_span_builder.rs", line: 16 }] }
A lemmy restart fixes the problem temporarily. There is plenty of free disk space on the server.
The problem might be related to the fact that I set the db pool size to 95 because of LemmyNet/lemmy#3661. I lowered it to the previous value of 32 now, lets see if the problem happens again.
Version: 0.18.2
The text was updated successfully, but these errors were encountered:
could not resize shared memory segment "/PostgreSQL.1513506408" is a problem with shared memory (/dev/shm) not disk space. Is postgres constrained in the amount of shared memory it can use, or is there only a small amount on the server?
Nutomic
changed the title
[Bug]: All logins failing with high db pool size
Document that high db pool size requires increased shared memory for postgres
Jul 27, 2023
Setting a high db pool size causes various sql query errors, most notably logins failing entirely. To fix it, shared memory for postgres needs to be increased with the following line in docker-compose.yml. This should be documented, but not sure where it fits.
Original Lemmy issue
Logins on lemmy.ml are consistently failing with known working user/password. Server logs show the following error:
A lemmy restart fixes the problem temporarily. There is plenty of free disk space on the server.
The problem might be related to the fact that I set the db pool size to 95 because of LemmyNet/lemmy#3661. I lowered it to the previous value of 32 now, lets see if the problem happens again.
Version: 0.18.2
The text was updated successfully, but these errors were encountered: