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

Error when query memory lane / timeline #15701

Open
1 of 3 tasks
alextran1502 opened this issue Jan 26, 2025 · 0 comments
Open
1 of 3 tasks

Error when query memory lane / timeline #15701

alextran1502 opened this issue Jan 26, 2025 · 0 comments
Assignees

Comments

@alextran1502
Copy link
Contributor

alextran1502 commented Jan 26, 2025

The bug

The database triggers an error when querying the memory lane; this issue happens in some instances. The date is likely the contributing factor.

The OS that Immich Server is running on

N/A

Version of Immich Server

v1.125.3

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

  1. Entering the web timeline
  2. Database error

Relevant log output

On one instance

2025-01-26 18:15:31.017 UTC [1] LOG:  server process (PID 1772) was terminated by signal 11: Segmentation fault
2025-01-26 18:15:31.017 UTC [1] DETAIL:  Failed process was running: with "res" as (with "today" as (select make_date(year::int, $1::int, $2::int) as "date" from generate_seri>

Another instance

immich_server            | Query failed : {
immich_server            |   durationMs: 317.0257779999956,
immich_server            |   error: Error: write CONNECTION_CLOSED database:5432
immich_server            |       at Socket.closed (/usr/src/app/node_modules/postgres/cjs/src/connection.js:438:57)
immich_server            |       at Socket.emit (node:events:524:28)
immich_server            |       at TCP.<anonymous> (node:net:351:12)
immich_server            |       at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
immich_server            |     code: 'CONNECTION_CLOSED',
immich_server            |     errno: 'CONNECTION_CLOSED',
immich_server            |     address: [ 'database' ],
immich_server            |     port: [ 5432 ]
immich_server            |   },
immich_server            |   sql: `with "res" as (with "today" as (select make_date(year::int, $1::int, $2::int) as "date" from generate_series((select date_part('year', min(("localDateTime" at time zone 'UTC')::date))::int from assets), date_part('year', current_date)::int - 1) as "year") select "a".*, to_json("exif") as "exifInfo" from "today" inner join lateral (select "assets".* from "assets" inner join "asset_job_status" on "assets"."id" = "asset_job_status"."assetId" where "asset_job_status"."previewAt" is not null and (assets."localDateTime" at time zone 'UTC')::date = today.date and "assets"."ownerId" = any($3::uuid[]) and "assets"."isVisible" = $4 and "assets"."isArchived" = $5 and exists (select from "asset_files" where "assetId" = "assets"."id" and "asset_files"."type" = $6) and "assets"."deletedAt" is null limit $7) as "a" on true inner join "exif" on "a"."id" = "exif"."assetId") select ((now() at time zone 'UTC')::date - ("localDateTime" at time zone 'UTC')::date) / 365 as "yearsAgo", json_agg("res") as "assets" from "res" group by ("localDateTime" at time zone 'UTC')::date order by ("localDateTime" at time zone 'UTC')::date desc limit $8`,
immich_server            |   params: [
immich_server            |     1,
immich_server            |     26,
immich_server            |     '{13a2b15f-b65f-4994-9e42-39e4a1d79460}',
immich_server            |     true,
immich_server            |     false,
immich_server            |     'preview',
immich_server            |     20,
immich_server            |     10
immich_server            |   ]
immich_server            | }
immich_server            | Postgres notice: {
immich_server            |   severity_local: 'WARNING',
immich_server            |   severity: 'WARNING',
immich_server            |   code: '57P02',
immich_server            |   message: 'terminating connection because of crash of another server process',
immich_server            |   detail: 'The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.',
immich_server            |   hint: 'In a moment you should be able to reconnect to the database and repeat your command.',
immich_server            |   file: 'postgres.c',
immich_server            |   line: '2888',
immich_server            |   routine: 'quickdie'
immich_server            | }

Additional information

No response

@alextran1502 alextran1502 changed the title Error when query memory lane Error when query memory lane / timeline Jan 26, 2025
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

No branches or pull requests

2 participants