IgnisDa / ryot

Roll your own tracker!
https://ryot.io
GNU General Public License v3.0
1.94k stars 51 forks source link

Summary not regenerates and metadata error #576

Closed ebiagi closed 8 months ago

ebiagi commented 9 months ago

Description:

since the upgrade from 3.x to 4.x my summary is not regenerating anymore:

image

I'm now on version 4.1.3 and if I click on "Regenerate Summaries" nothing happens, both in the normal user and in the admin account. No errors in log except form this one if I try to "Update all metadata" with the admin account (recurring multiple times during the update):

[backend] 2024-01-15T20:07:04.929300Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 72559: Error { message: "missing field `id` at line 1 column 100", extensions: None }
[backend] 2024-01-15T20:07:41.735520Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 2022: Error { message: "missing field `id` at line 1 column 100", extensions: None }
[backend] 2024-01-15T20:07:55.117187Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 26943: Error { message: "missing field `id` at line 1 column 100", extensions: None }
[backend] 2024-01-15T20:07:58.234881Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 2778: Error { message: "missing field `id` at line 1 column 100", extensions: None }
[backend] 2024-01-15T20:08:00.107923Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 3019: Error { message: "missing field `id` at line 1 column 100", extensions: None }

Additional Information:

I'm on postgres

IgnisDa commented 9 months ago

Set the environment variable RUST_LOG: ryot=trace and try regenerating the summary.

ebiagi commented 9 months ago

Here it is

frontend] GET / 200 - - 1375.447 ms
[frontend] Error: No route matches URL "/sw.js"
[frontend]     at getInternalRouterError (/home/ryot/n
ode_modules/@remix-run/router/router.ts:4487:5)
[frontend]     at Object.query (/home/ryot/node_module
s/@remix-run/router/router.ts:2933:19)
[frontend]     at handleDocumentRequestRR (/home/ryot/
node_modules/@remix-run/server-runtime/dist/server.js:
180:35)
[frontend]     at requestHandler (/home/ryot/node_modu
les/@remix-run/server-runtime/dist/server.js:105:24)
[frontend]     at /home/ryot/node_modules/@remix-run/e
xpress/dist/server.js:41:28
[frontend] ErrorResponseImpl {
[frontend]   status: 404,
[frontend]   statusText: 'Not Found',
[frontend]   internal: true,
[frontend]   data: 'Error: No route matches URL "/sw.j
s"',
[frontend]   error: Error: No route matches URL "/sw.j
s"
[frontend]       at getInternalRouterError (/home/ryot
/node_modules/@remix-run/router/router.ts:4487:5)
[frontend]       at Object.query (/home/ryot/node_modu
les/@remix-run/router/router.ts:2933:19)
[frontend]       at handleDocumentRequestRR (/home/ryo
t/node_modules/@remix-run/server-runtime/dist/server.j
s:180:35)
[frontend]       at requestHandler (/home/ryot/node_mo
dules/@remix-run/server-runtime/dist/server.js:105:24)
[frontend]       at /home/ryot/node_modules/@remix-run
/express/dist/server.js:41:28
[frontend] }
[frontend] GET /sw.js 404 - - 160.713 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F
_dashboard.settings.miscellaneous 200 - - 44.893 ms
[frontend] POST /settings/miscellaneous?_data=routes%2
F_dashboard.settings.miscellaneous 200 - - 34.879 ms
[frontend] GET /settings/miscellaneous?_data=root 200
- - 11.863 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F
_dashboard.settings.miscellaneous 200 - - 57.099 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F
_dashboard 200 - - 70.221 ms
[backend] 2024-01-16T17:18:38.028812Z TRACE ryot::back
ground: Started job: "RecalculateUserSummary"
[backend] 2024-01-16T17:18:38.087244Z TRACE ryot::back
ground: Job: "RecalculateUserSummary", Time Taken: 58m
s, Successful = false
[frontend] Error: No route matches URL "/sw.js"
[frontend]     at getInternalRouterError (/home/ryot/n
ode_modules/@remix-run/router/router.ts:4487:5)
[frontend]     at Object.query (/home/ryot/node_module
s/@remix-run/router/router.ts:2933:19)
[frontend]     at handleDocumentRequestRR (/home/ryot/
node_modules/@remix-run/server-runtime/dist/server.js:
180:35)
[frontend]     at requestHandler (/home/ryot/node_modu
les/@remix-run/server-runtime/dist/server.js:105:24)
[frontend]     at /home/ryot/node_modules/@remix-run/e
xpress/dist/server.js:41:28
[frontend] ErrorResponseImpl {
[frontend]   status: 404,
[frontend]   statusText: 'Not Found',
[frontend]   internal: true,
[frontend]   data: 'Error: No route matches URL "/sw.j
s"',
[frontend]   error: Error: No route matches URL "/sw.j
s"
[frontend]       at getInternalRouterError (/home/ryot
/node_modules/@remix-run/router/router.ts:4487:5)
[frontend]       at Object.query (/home/ryot/node_modu
les/@remix-run/router/router.ts:2933:19)
[frontend]       at handleDocumentRequestRR (/home/ryo
t/node_modules/@remix-run/server-runtime/dist/server.j
s:180:35)
[frontend]       at requestHandler (/home/ryot/node_mo
dules/@remix-run/server-runtime/dist/server.js:105:24)
[frontend]       at /home/ryot/node_modules/@remix-run
/express/dist/server.js:41:28
[frontend] }
[frontend] GET /sw.js 404 - - 19.136 ms
IgnisDa commented 9 months ago

@ebiagi please email me a dump of your database along with the login credentials. The email id is in my profile.

mrdev023 commented 9 months ago

Me i optain this and show episodes is not synced from tmdb

ryot_db     | 2024-01-19 00:06:37.338 UTC [20714] STATEMENT:  INSERT INTO "metadata_to_metadata" ("from_metadata_id", "relation", "to_metadata_id") VALUES ($1, $2, $3) RETURNING "id", "from_metadata_id", "relation", "to_metadata_id"
ryot_db     | 2024-01-19 00:06:40.880 UTC [20716] ERROR:  duplicate key value violates unique constraint "metadata_to_metadata_from_metadata_id_relation_to_metadata__idx"
ryot_db     | 2024-01-19 00:06:40.880 UTC [20716] DETAIL:  Key (from_metadata_id, relation, to_metadata_id)=(61, SU, 42455) already exists.
ryot_db     | 2024-01-19 00:06:40.880 UTC [20716] STATEMENT:  INSERT INTO "metadata_to_metadata" ("from_metadata_id", "relation", "to_metadata_id") VALUES ($1, $2, $3) RETURNING "id", "from_metadata_id", "relation", "to_metadata_id"
ryot_db     | 2024-01-19 00:06:41.801 UTC [20713] ERROR:  duplicate key value violates unique constraint "metadata_to_metadata_from_metadata_id_relation_to_metadata__idx"
ryot_db     | 2024-01-19 00:06:41.801 UTC [20713] DETAIL:  Key (from_metadata_id, relation, to_metadata_id)=(65584, SU, 15487) already exists.
ryot_db     | 2024-01-19 00:06:41.801 UTC [20713] STATEMENT:  INSERT INTO "metadata_to_metadata" ("from_metadata_id", "relation", "to_metadata_id") VALUES ($1, $2, $3) RETURNING "id", "from_metadata_id", "relation", "to_metadata_id"
ryot_db     | 2024-01-19 00:06:43.904 UTC [20710] ERROR:  duplicate key value violates unique constraint "metadata_to_metadata_from_metadata_id_relation_to_metadata__idx"
ryot_db     | 2024-01-19 00:06:43.904 UTC [20710] DETAIL:  Key (from_metadata_id, relation, to_metadata_id)=(75268, SU, 41733) already exists.
ryot_db     | 2024-01-19 00:06:43.904 UTC [20710] STATEMENT:  INSERT INTO "metadata_to_metadata" ("from_metadata_id", "relation", "to_metadata_id") VALUES ($1, $2, $3) RETURNING "id", "from_metadata_id", "relation", "to_metadata_id"
ryot_db     | 2024-01-19 00:06:45.783 UTC [20714] ERROR:  duplicate key value violates unique constraint "metadata_to_metadata_from_metadata_id_relation_to_metadata__idx"
ryot_db     | 2024-01-19 00:06:45.783 UTC [20714] DETAIL:  Key (from_metadata_id, relation, to_metadata_id)=(7755, SU, 25325) already exists.
ryot_db     | 2024-01-19 00:06:45.783 UTC [20714] STATEMENT:  INSERT INTO "metadata_to_metadata" ("from_metadata_id", "relation", "to_metadata_id") VALUES ($1, $2, $3) RETURNING "id", "from_metadata_id", "relation", "to_metadata_id"
ryot_db     | 2024-01-19 00:06:50.019 UTC [20713] ERROR:  duplicate key value violates unique constraint "metadata_to_metadata_from_metadata_id_relation_to_metadata__idx"
ryot_db     | 2024-01-19 00:06:50.019 UTC [20713] DETAIL:  Key (from_metadata_id, relation, to_metadata_id)=(153722, SU, 152687) already exists.
ryot_db     | 2024-01-19 00:06:50.019 UTC [20713] STATEMENT:  INSERT INTO "metadata_to_metadata" ("from_metadata_id", "relation", "to_metadata_id") VALUES ($1, $2, $3) RETURNING "id", "from_metadata_id", "relation", "to_metadata_id"
ryot        | [backend] 2024-01-19T00:04:12.183033Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 88076: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:04:16.201714Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 136815: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:04:31.266015Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 174689: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:04:43.657693Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 40716: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:09:26.337518Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 91148: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:09:57.453914Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 176157: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:10:01.476023Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 95359: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:10:19.504458Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 171664: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }
ryot        | [backend] 2024-01-19T00:10:27.950178Z ERROR ryot::miscellaneous::resolver: Error while updating metadata = 113757: Error { message: "An error occured while creating a new object: Cannot assign requested address (os error 99)", extensions: None }

Example: image But episodes exist in tmdb https://www.themoviedb.org/tv/220150/season/1

IgnisDa commented 9 months ago

@mrdev023 please open a separate issue. Yours is a different problem.

IgnisDa commented 9 months ago

Closing due to inactivity. @ebiagi Feel free to ping me here if you have any update.

ebiagi commented 9 months ago

@IgnisDa I sent you the dum a few days ago (on the 17/01), have you received it? Sorry I didn't write here I've tried to update ryot to the latest version (4.1.7) but now I have some other problems and ryot won't start:

[backend] 2024-01-22T07:42:20.240860Z ERROR ryot: Database migration failed: Execution Error: error returned from database: la relazione "public.user" non esiste
[backend] Error: There was an error running the database migrations.
[backend] BACKEND_PORT=5000 /usr/local/bin/ryot exited with code 1
--> Sending SIGTERM to other processes..
node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: spawn ps ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn ps',
  path: 'ps',
  spawnargs: [ '-o', 'pid', '--no-headers', '--ppid', 14 ]
}

Node.js v20.10.0
IgnisDa commented 9 months ago

@ebiagi I seem to have not recieved it. Please send it to me again.

Can you show your docker compose, the latest migration assumes that the postgres schema is in public. I think you have specified a different schema.

ebiagi commented 9 months ago

Yes, I have a different schema (ryot), this is the string in my .env file (I launch ryot with the docker run command)

DATABASE_URL=postgres://ryot:SECRETPASS@SECRETHOST:5432/ryot
TZ=Europe/Rome

This is the first schema error, everything was fine until now

IgnisDa commented 9 months ago

How are you specifying the schema? In the connection string you pasted, ryot is the username and database name.

Also I have not received your database dump. Please email it to me at ignisda2001@gmail.com.

ebiagi commented 9 months ago

Sent the email now, thaks! There is no need to specify the schema name because I set the priorities set in the search_path:

"$user", public

If I connect with the user ryot then pgsql will search the schemas in that order

IgnisDa commented 9 months ago

Ahh okay, makes sense. I take you made this change in the postgres conf, not Ryot, right?

~I haven't received your email.~ it was in my spam. Will take a look into it.

IgnisDa commented 9 months ago

@ebiagi you have not emailed the username and password. I can't login to your restored database.

ebiagi commented 9 months ago

aargh, sorry, emaile them now. I take you made this change in the postgres conf, not Ryot, right? -> right!

IgnisDa commented 9 months ago

@ebiagi I published v4.1.8 which should fix the migration error. Please try to regenerate summary after upgrading. It worked for me when I tried on your database.

ebiagi commented 9 months ago

Deployed the version 4.1.8 and:

[backend] 2024-01-22T15:59:48.008778Z TRACE ryot::background: Started job: "RecalculateUserSummary"
[backend] 2024-01-22T15:59:48.051338Z TRACE ryot::background: Job: "RecalculateUserSummary", Time Taken: 42ms, Successful = false
[frontend] GET /?_data=routes%2F_dashboard._index 200 - - 284.549 ms
IgnisDa commented 9 months ago

I do not understand why the job is not successful for you. Can you set RUST_LOG=sea_orm=trace and try rerunning summary? There will be a lot of logs so you might have to use pastebin etc.

ebiagi commented 9 months ago

I put the following variables on the .env file:

DATABASE_URL=postgres://ryot:SECRET@SECRET:5432/ryot
TZ=Europe/Rome
RUST_LOG=sea_orm=trace
RUST_LOG=ryot=trace

Logs were always the same, nothing added. Then I tried with a generic

RUST_LOG=trace

And tried to capture the regeneration logs whitin the others:

job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}: ryot::background: Started job: "RecalculateUserSummary"
[backend] 2024-01-22T17:36:00.004881Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:execute{self=SqlxPostgresPoolConnection stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}:execute{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: UPDATE "user_to_entity" SET "metadata_units_consumed" = 0 WHERE "user_to_entity"."user_id" = 2
[backend] 2024-01-22T17:36:00.017838Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:execute{self=SqlxPostgresPoolConnection stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}:execute{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}: sqlx::query: summary="UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" ..." db.statement="\n\nUPDATE\n  \"user_to_entity\"\nSET\n  \"metadata_units_consumed\" = $1\nWHERE\n  \"user_to_entity\".\"user_id\" = $2\n" rows_affected=135 rows_returned=0 elapsed=10.4389ms
[backend] 2024-01-22T17:36:00.018479Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "review"."id", "review"."posted_on", "review"."rating", "review"."text", "review"."visibility", "review"."spoiler", "review"."user_id", "review"."metadata_id", "review"."person_id", "review"."metadata_group_id", "review"."collection_id", "review"."extra_information", "review"."comments" FROM "review" WHERE "review"."user_id" = 2) AS "sub_query"
[backend] 2024-01-22T17:36:00.029381Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sqlx::query: summary="SELECT COUNT(*) AS num_items ..." db.statement="\n\nSELECT\n  COUNT(*) AS num_items\nFROM\n  (\n    SELECT\n      \"review\".\"id\",\n      \"review\".\"posted_on\",\n      \"review\".\"rating\",\n      \"review\".\"text\",\n      \"review\".\"visibility\",\n      \"review\".\"spoiler\",\n      \"review\".\"user_id\",\n      \"review\".\"metadata_id\",\n      \"review\".\"person_id\",\n      \"review\".\"metadata_group_id\",\n      \"review\".\"collection_id\",\n      \"review\".\"extra_information\",\n      \"review\".\"comments\"\n    FROM\n      \"review\"\n    WHERE\n      \"review\".\"user_id\" = $1\n  ) AS \"sub_query\"\n" rows_affected=0 rows_returned=1 elapsed=6.685858ms
[backend] 2024-01-22T17:36:00.029950Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_measurement"."timestamp", "user_measurement"."user_id", "user_measurement"."name", "user_measurement"."comment", "user_measurement"."stats" FROM "user_measurement" WHERE "user_measurement"."user_id" = 2) AS "sub_query"
[backend] 2024-01-22T17:36:00.036312Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sqlx::query: summary="SELECT COUNT(*) AS num_items ..." db.statement="\n\nSELECT\n  COUNT(*) AS num_items\nFROM\n  (\n    SELECT\n      \"user_measurement\".\"timestamp\",\n      \"user_measurement\".\"user_id\",\n      \"user_measurement\".\"name\",\n      \"user_measurement\".\"comment\",\n      \"user_measurement\".\"stats\"\n    FROM\n      \"user_measurement\"\n    WHERE\n      \"user_measurement\".\"user_id\" = $1\n  ) AS \"sub_query\"\n" rows_affected=0 rows_returned=1 elapsed=4.019211ms
[backend] 2024-01-22T17:36:00.036658Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "workout"."id", "workout"."repeated_from", "workout"."start_time", "workout"."end_time", "workout"."user_id", "workout"."summary", "workout"."information", "workout"."name", "workout"."comment" FROM "workout" WHERE "workout"."user_id" = 2) AS "sub_query"
[backend] 2024-01-22T17:36:00.044769Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sqlx::query: summary="SELECT COUNT(*) AS num_items ..." db.statement="\n\nSELECT\n  COUNT(*) AS num_items\nFROM\n  (\n    SELECT\n      \"workout\".\"id\",\n      \"workout\".\"repeated_from\",\n      \"workout\".\"start_time\",\n      \"workout\".\"end_time\",\n      \"workout\".\"user_id\",\n      \"workout\".\"summary\",\n      \"workout\".\"information\",\n      \"workout\".\"name\",\n      \"workout\".\"comment\"\n    FROM\n      \"workout\"\n    WHERE\n      \"workout\".\"user_id\" = $1\n  ) AS \"sub_query\"\n" rows_affected=0 rows_returned=1 elapsed=5.41874ms
[backend] 2024-01-22T17:36:00.045205Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_to_entity"."id", "user_to_entity"."last_updated_on", "user_to_entity"."user_id", "user_to_entity"."metadata_id", "user_to_entity"."exercise_id", "user_to_entity"."metadata_monitored", "user_to_entity"."metadata_units_consumed", "user_to_entity"."metadata_reminder", "user_to_entity"."metadata_ownership", "user_to_entity"."exercise_extra_information", "user_to_entity"."exercise_num_times_interacted" FROM "user_to_entity" WHERE "user_to_entity"."user_id" = 2 AND "user_to_entity"."metadata_id" IS NOT NULL) AS "sub_query"
[backend] 2024-01-22T17:36:00.049768Z DEBUG sqlx::query: summary="SELECT * FROM Jobs ..." db.statement="\n\nSELECT\n  *\nFROM\n  Jobs\nWHERE\n  (\n    status = 'Pending'\n    OR (\n      status = 'Failed'\n      AND attempts < max_attempts\n    )\n  )\n  AND run_at < ?1\n  AND job_type = ?2\nLIMIT\n  ?3\n" rows_affected=0 rows_returned=0 elapsed=76.477µs
[backend] 2024-01-22T17:36:00.049780Z DEBUG sqlx::query: summary="SELECT * FROM Jobs ..." db.statement="\n\nSELECT\n  *\nFROM\n  Jobs\nWHERE\n  (\n    status = 'Pending'\n    OR (\n      status = 'Failed'\n      AND attempts < max_attempts\n    )\n  )\n  AND run_at < ?1\n  AND job_type = ?2\nLIMIT\n  ?3\n" rows_affected=1 rows_returned=0 elapsed=118.472µs
[backend] 2024-01-22T17:36:00.052013Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sqlx::query: summary="SELECT COUNT(*) AS num_items ..." db.statement="\n\nSELECT\n  COUNT(*) AS num_items\nFROM\n  (\n    SELECT\n      \"user_to_entity\".\"id\",\n      \"user_to_entity\".\"last_updated_on\",\n      \"user_to_entity\".\"user_id\",\n      \"user_to_entity\".\"metadata_id\",\n      \"user_to_entity\".\"exercise_id\",\n      \"user_to_entity\".\"metadata_monitored\",\n      \"user_to_entity\".\"metadata_units_consumed\",\n      \"user_to_entity\".\"metadata_reminder\",\n      \"user_to_entity\".\"metadata_ownership\",\n      \"user_to_entity\".\"exercise_extra_information\",\n      \"user_to_entity\".\"exercise_num_times_interacted\"\n    FROM\n      \"user_to_entity\"\n    WHERE\n      \"user_to_entity\".\"user_id\" = $1\n      AND \"user_to_entity\".\"metadata_id\" IS NOT NULL\n  ) AS \"sub_query\"\n" rows_affected=0 rows_returned=1 elapsed=4.144505ms
[backend] 2024-01-22T17:36:00.052563Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_to_entity"."id", "user_to_entity"."last_updated_on", "user_to_entity"."user_id", "user_to_entity"."metadata_id", "user_to_entity"."exercise_id", "user_to_entity"."metadata_monitored", "user_to_entity"."metadata_units_consumed", "user_to_entity"."metadata_reminder", "user_to_entity"."metadata_ownership", "user_to_entity"."exercise_extra_information", "user_to_entity"."exercise_num_times_interacted" FROM "user_to_entity" WHERE "user_to_entity"."user_id" = 2 AND "user_to_entity"."exercise_id" IS NOT NULL) AS "sub_query"
[backend] 2024-01-22T17:36:00.054563Z DEBUG sqlx::query: summary="SELECT * FROM Jobs ..." db.statement="\n\nSELECT\n  *\nFROM\n  Jobs\nWHERE\n  (\n    status = 'Pending'\n    OR (\n      status = 'Failed'\n      AND attempts < max_attempts\n    )\n  )\n  AND run_at < ?1\n  AND job_type = ?2\nLIMIT\n  ?3\n" rows_affected=0 rows_returned=0 elapsed=62.376µs
[backend] 2024-01-22T17:36:00.059868Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sqlx::query: summary="SELECT COUNT(*) AS num_items ..." db.statement="\n\nSELECT\n  COUNT(*) AS num_items\nFROM\n  (\n    SELECT\n      \"user_to_entity\".\"id\",\n      \"user_to_entity\".\"last_updated_on\",\n      \"user_to_entity\".\"user_id\",\n      \"user_to_entity\".\"metadata_id\",\n      \"user_to_entity\".\"exercise_id\",\n      \"user_to_entity\".\"metadata_monitored\",\n      \"user_to_entity\".\"metadata_units_consumed\",\n      \"user_to_entity\".\"metadata_reminder\",\n      \"user_to_entity\".\"metadata_ownership\",\n      \"user_to_entity\".\"exercise_extra_information\",\n      \"user_to_entity\".\"exercise_num_times_interacted\"\n    FROM\n      \"user_to_entity\"\n    WHERE\n      \"user_to_entity\".\"user_id\" = $1\n      AND \"user_to_entity\".\"exercise_id\" IS NOT NULL\n  ) AS \"sub_query\"\n" rows_affected=0 rows_returned=1 elapsed=3.861723ms
[backend] 2024-01-22T17:36:00.060346Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS "minutes", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS "weight" FROM "workout" WHERE "workout"."user_id" = 2 LIMIT 1
[backend] 2024-01-22T17:36:00.067222Z  INFO job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}:query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sqlx::query: summary="SELECT coalesce(extract(epoch from sum(end_time ..." db.statement="\n\nSELECT\n  coalesce(\n    extract(\n      epoch\n      from\n        sum(end_time - start_time)\n    ) / 60,\n    0\n  ) AS \"minutes\",\n  coalesce(\n    sum((summary -> 'total' ->> 'weight') :: numeric),\n    0\n  ) AS \"weight\"\nFROM\n  \"workout\"\nWHERE\n  \"workout\".\"user_id\" = $1\nLIMIT\n  $2\n" rows_affected=0 rows_returned=1 elapsed=4.076616ms
[backend] 2024-01-22T17:36:00.067561Z TRACE job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}: ryot::background: Job: "RecalculateUserSummary", Time Taken: 62ms, Successful = false
[backend] 2024-01-22T17:36:00.068711Z DEBUG sqlx::query: summary="UPDATE Jobs SET status ..." db.statement="\n\nUPDATE\n  Jobs\nSET\n  status = 'Done',\n  done_at = strftime('%s', 'now')\nWHERE\n  id = ?1\n  AND lock_by = ?2\n" rows_affected=1 rows_returned=0 elapsed=256.243µs
[backend] 2024-01-22T17:36:00.069211Z DEBUG job{job_id="JID-01HMS3WJHZB2MZDBY363GJAB0P" current_attempt=0}: apalis_core::layers::tracing::on_response: job.done done_in=65ms result=()
IgnisDa commented 9 months ago

@ebiagi Put just RUST_LOG=sea_orm=debug and remove the other rust logs. I want to see the exact SQL that is executed.

ebiagi commented 8 months ago

Here it is

[backend] 2024-01-24T18:20:03.810535Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT "user"."id", "user"."name", "user"."email", "user"."password", "user"."lot", "user"."preferences", "user"."yank_integrations", "user"."sink_integrations", "user"."notifications", "user"."summary" FROM "user" WHERE "user"."id" = 2 LIMIT 1
[backend] 2024-01-24T18:20:03.831675Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT \"user\".\"preferences\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT \"user\".\"preferences\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT "user"."preferences" FROM "user" WHERE "user"."id" = 2 LIMIT 1
[frontend] GET /settings/miscellaneous?_data=root 200 - - 10.377 ms
[backend] 2024-01-24T18:20:03.849485Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT "user"."id", "user"."name", "user"."email", "user"."password", "user"."lot", "user"."preferences", "user"."yank_integrations", "user"."sink_integrations", "user"."notifications", "user"."summary" FROM "user" WHERE "user"."id" = 2 LIMIT 1
[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard 200 - - 50.007 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard.settings.miscellaneous 200 - - 33.649 ms
[backend] 2024-01-24T18:20:04.007322Z DEBUG execute{self=SqlxPostgresPoolConnection stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}:execute{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: UPDATE "user_to_entity" SET "metadata_units_consumed" = 0 WHERE "user_to_entity"."user_id" = 2
[backend] 2024-01-24T18:20:04.016460Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "review"."id", "review"."posted_on", "review"."rating", "review"."text", "review"."visibility", "review"."spoiler", "review"."user_id", "review"."metadata_id", "review"."person_id", "review"."metadata_group_id", "review"."collection_id", "review"."extra_information", "review"."comments" FROM "review" WHERE "review"."user_id" = 2) AS "sub_query"
[backend] 2024-01-24T18:20:04.020014Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_measurement"."timestamp", "user_measurement"."user_id", "user_measurement"."name", "user_measurement"."comment", "user_measurement"."stats" FROM "user_measurement" WHERE "user_measurement"."user_id" = 2) AS "sub_query"
[backend] 2024-01-24T18:20:04.025606Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "workout"."id", "workout"."repeated_from", "workout"."start_time", "workout"."end_time", "workout"."user_id", "workout"."summary", "workout"."information", "workout"."name", "workout"."comment" FROM "workout" WHERE "workout"."user_id" = 2) AS "sub_query"
[backend] 2024-01-24T18:20:04.029428Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_to_entity"."id", "user_to_entity"."last_updated_on", "user_to_entity"."user_id", "user_to_entity"."metadata_id", "user_to_entity"."exercise_id", "user_to_entity"."metadata_monitored", "user_to_entity"."metadata_units_consumed", "user_to_entity"."metadata_reminder", "user_to_entity"."metadata_ownership", "user_to_entity"."exercise_extra_information", "user_to_entity"."exercise_num_times_interacted" FROM "user_to_entity" WHERE "user_to_entity"."user_id" = 2 AND "user_to_entity"."metadata_id" IS NOT NULL) AS "sub_query"
[backend] 2024-01-24T18:20:04.033759Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_to_entity"."id", "user_to_entity"."last_updated_on", "user_to_entity"."user_id", "user_to_entity"."metadata_id", "user_to_entity"."exercise_id", "user_to_entity"."metadata_monitored", "user_to_entity"."metadata_units_consumed", "user_to_entity"."metadata_reminder", "user_to_entity"."metadata_ownership", "user_to_entity"."exercise_extra_information", "user_to_entity"."exercise_num_times_interacted" FROM "user_to_entity" WHERE "user_to_entity"."user_id" = 2 AND "user_to_entity"."exercise_id" IS NOT NULL) AS "sub_query"
[backend] 2024-01-24T18:20:04.037727Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS "minutes", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS "weight" FROM "workout" WHERE "workout"."user_id" = 2 LIMIT 1
IgnisDa commented 8 months ago

Please run this query in the database directly and show me the output:

SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS "minutes", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS "weight" FROM "workout" WHERE "workout"."user_id" = 2 LIMIT 1

Also how much memory does your host server have?

ebiagi commented 8 months ago

Here's the output

image

The machine has 12 gb of ram

IgnisDa commented 8 months ago

I will add some logging to the summary calculation in the next release to help debug this issue.

IgnisDa commented 8 months ago

@ebiagi i have added some logging. Please upgrade and set RUST_LOG=Ryot=trace env var and then try regenerating summary.

ebiagi commented 8 months ago

ok, updated to version 4.1.12 and

with RUST_LOG=Ryot=trace

[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard.settings.miscellaneous 200 - - 48.719 ms
[frontend] POST /settings/miscellaneous?_data=routes%2F_dashboard.settings.miscellaneous 200 - - 34.308 ms
[frontend] GET /settings/miscellaneous?_data=root 200 - - 8.345 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard.settings.miscellaneous 200 - - 59.736 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard 200 - - 47.304 ms
[backend] 2024-01-26T09:50:24.031412Z TRACE ryot::background: Started job: "RecalculateUserSummary"
[backend] 2024-01-26T09:50:24.077126Z TRACE ryot::background: Job: "RecalculateUserSummary", Time Taken: 45ms, Successful = false

while with RUST_LOG=sea_orm=trace

[backend] 2024-01-26T09:52:51.228009Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT "user"."id", "user"."name", "user"."email", "user"."password", "user"."lot", "user"."preferences", "user"."yank_integrations", "user"."sink_integrations", "user"."notifications", "user"."summary" FROM "user" WHERE "user"."id" = 2 LIMIT 1
[backend] 2024-01-26T09:52:51.228006Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT \"user\".\"id\", \"user\".\"name\", \"user\".\"email\", \"user\".\"password\", \"user\".\"lot\", \"user\".\"preferences\", \"user\".\"yank_integrations\", \"user\".\"sink_integrations\", \"user\".\"notifications\", \"user\".\"summary\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT "user"."id", "user"."name", "user"."email", "user"."password", "user"."lot", "user"."preferences", "user"."yank_integrations", "user"."sink_integrations", "user"."notifications", "user"."summary" FROM "user" WHERE "user"."id" = 2 LIMIT 1
[backend] 2024-01-26T09:52:51.255080Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT \"user\".\"preferences\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT \"user\".\"preferences\" FROM \"user\" WHERE \"user\".\"id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT "user"."preferences" FROM "user" WHERE "user"."id" = 2 LIMIT 1
[backend] 2024-01-26T09:52:52.005061Z DEBUG execute{self=SqlxPostgresPoolConnection stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}:execute{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 5, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "UPDATE \"user_to_entity\" SET \"metadata_units_consumed\" = $1 WHERE \"user_to_entity\".\"user_id\" = $2", values: Some(Values([Int(Some(0)), Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: UPDATE "user_to_entity" SET "metadata_units_consumed" = 0 WHERE "user_to_entity"."user_id" = 2
[backend] 2024-01-26T09:52:52.017094Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"review\".\"id\", \"review\".\"posted_on\", \"review\".\"rating\", \"review\".\"text\", \"review\".\"visibility\", \"review\".\"spoiler\", \"review\".\"user_id\", \"review\".\"metadata_id\", \"review\".\"person_id\", \"review\".\"metadata_group_id\", \"review\".\"collection_id\", \"review\".\"extra_information\", \"review\".\"comments\" FROM \"review\" WHERE \"review\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "review"."id", "review"."posted_on", "review"."rating", "review"."text", "review"."visibility", "review"."spoiler", "review"."user_id", "review"."metadata_id", "review"."person_id", "review"."metadata_group_id", "review"."collection_id", "review"."extra_information", "review"."comments" FROM "review" WHERE "review"."user_id" = 2) AS "sub_query"
[backend] 2024-01-26T09:52:52.023768Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_measurement\".\"timestamp\", \"user_measurement\".\"user_id\", \"user_measurement\".\"name\", \"user_measurement\".\"comment\", \"user_measurement\".\"stats\" FROM \"user_measurement\" WHERE \"user_measurement\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_measurement"."timestamp", "user_measurement"."user_id", "user_measurement"."name", "user_measurement"."comment", "user_measurement"."stats" FROM "user_measurement" WHERE "user_measurement"."user_id" = 2) AS "sub_query"
[backend] 2024-01-26T09:52:52.030317Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"workout\".\"id\", \"workout\".\"repeated_from\", \"workout\".\"start_time\", \"workout\".\"end_time\", \"workout\".\"user_id\", \"workout\".\"summary\", \"workout\".\"information\", \"workout\".\"name\", \"workout\".\"comment\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "workout"."id", "workout"."repeated_from", "workout"."start_time", "workout"."end_time", "workout"."user_id", "workout"."summary", "workout"."information", "workout"."name", "workout"."comment" FROM "workout" WHERE "workout"."user_id" = 2) AS "sub_query"
[backend] 2024-01-26T09:52:52.037056Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"metadata_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_to_entity"."id", "user_to_entity"."last_updated_on", "user_to_entity"."user_id", "user_to_entity"."metadata_id", "user_to_entity"."exercise_id", "user_to_entity"."metadata_monitored", "user_to_entity"."metadata_units_consumed", "user_to_entity"."metadata_reminder", "user_to_entity"."metadata_ownership", "user_to_entity"."exercise_extra_information", "user_to_entity"."exercise_num_times_interacted" FROM "user_to_entity" WHERE "user_to_entity"."user_id" = 2 AND "user_to_entity"."metadata_id" IS NOT NULL) AS "sub_query"
[backend] 2024-01-26T09:52:52.045494Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT COUNT(*) AS num_items FROM (SELECT \"user_to_entity\".\"id\", \"user_to_entity\".\"last_updated_on\", \"user_to_entity\".\"user_id\", \"user_to_entity\".\"metadata_id\", \"user_to_entity\".\"exercise_id\", \"user_to_entity\".\"metadata_monitored\", \"user_to_entity\".\"metadata_units_consumed\", \"user_to_entity\".\"metadata_reminder\", \"user_to_entity\".\"metadata_ownership\", \"user_to_entity\".\"exercise_extra_information\", \"user_to_entity\".\"exercise_num_times_interacted\" FROM \"user_to_entity\" WHERE \"user_to_entity\".\"user_id\" = $1 AND \"user_to_entity\".\"exercise_id\" IS NOT NULL) AS \"sub_query\"", values: Some(Values([Int(Some(2))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT COUNT(*) AS num_items FROM (SELECT "user_to_entity"."id", "user_to_entity"."last_updated_on", "user_to_entity"."user_id", "user_to_entity"."metadata_id", "user_to_entity"."exercise_id", "user_to_entity"."metadata_monitored", "user_to_entity"."metadata_units_consumed", "user_to_entity"."metadata_reminder", "user_to_entity"."metadata_ownership", "user_to_entity"."exercise_extra_information", "user_to_entity"."exercise_num_times_interacted" FROM "user_to_entity" WHERE "user_to_entity"."user_id" = 2 AND "user_to_entity"."exercise_id" IS NOT NULL) AS "sub_query"
[backend] 2024-01-26T09:52:52.052454Z DEBUG query_one{self=SqlxPostgresPoolConnection stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}:query_one{self=SqlxPostgresPoolConnection { pool: Pool { size: 5, num_idle: 4, is_closed: false, options: PoolOptions { max_connections: 10, min_connections: 5, connect_timeout: 10s, max_lifetime: Some(1800s), idle_timeout: Some(600s), test_before_acquire: true } } } stmt=Statement { sql: "SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS \"minutes\", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS \"weight\" FROM \"workout\" WHERE \"workout\".\"user_id\" = $1 LIMIT $2", values: Some(Values([Int(Some(2)), BigUnsigned(Some(1))])), db_backend: Postgres }}: sea_orm::driver::sqlx_postgres: SELECT coalesce(extract(epoch from sum(end_time - start_time)) / 60, 0) AS "minutes", coalesce(sum((summary -> 'total' ->> 'weight')::numeric), 0) AS "weight" FROM "workout" WHERE "workout"."user_id" = 2 LIMIT 1
[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard.settings.miscellaneous 200 - - 947.910 ms
[frontend] GET /settings/miscellaneous?_data=routes%2F_dashboard 200 - - 1007.447 ms
IgnisDa commented 8 months ago

It should be ryot not Ryot (capitalization).

ebiagi commented 8 months ago

Yes, I actually mistyped here but used ryot in the .env file (otherwise Ryot wouldn't create any output at all)

IgnisDa commented 8 months ago

Are you sure you restarted the container and then started the job again? There should be a lot more logs. Here is mine for example: image

ebiagi commented 8 months ago

Kinda weird, here's my .env file now

image

and here's the screenshot of the steps I took: image

and of course the ryot's version

image

IgnisDa commented 8 months ago

That means it didn't even get to the first logging statement. Weird. That means one of the initial SQL statements is failing (which i thought are infallible so I didn't add any logging there).

IgnisDa commented 8 months ago

@ebiagi Please update Ryot and change env var to RUST_LOG=ryot=debug and try again.

ebiagi commented 8 months ago

here it is

[backend] 2024-01-27T23:38:13.041040Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculating numbers summary for user UserSummary { fitness: UserFitnessSummary { measurements_recorded: 0, exercises_interacted_with: 0, workouts: UserFitnessWorkoutSummary { recorded: 0, duration: 0, weight: 0 } }, media: UserMediaSummary { books: BooksSummary { pages: 0, read: 0 }, movies: MoviesSummary { runtime: 0, watched: 0 }, podcasts: PodcastsSummary { runtime: 0, played: 0, played_episodes: 0 }, shows: ShowsSummary { runtime: 0, watched: 0, watched_episodes: 0, watched_seasons: 0 }, video_games: VideoGamesSummary { played: 0 }, visual_novels: VisualNovelsSummary { played: 0, runtime: 0 }, audio_books: AudioBooksSummary { runtime: 0, played: 0 }, anime: AnimeSummary { episodes: 0, watched: 0 }, manga: MangaSummary { chapters: 0, read: 0 }, reviews_posted: 0, media_interacted_with: 0 }, calculated_on: 1970-01-01T00:00:00Z, unique_items: UserSummaryUniqueItems { audio_books: {}, anime: {}, manga: {}, books: {}, movies: {}, visual_novels: {}, video_games: {}, show_episodes: {}, show_seasons: {}, shows: {}, podcast_episodes: {}, podcasts: {} } }
[backend] 2024-01-27T23:38:13.047490Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculated number reviews for user 64
[backend] 2024-01-27T23:38:13.053658Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculated number measurements for user 0
[backend] 2024-01-27T23:38:13.059393Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculated number workouts for user 0
[backend] 2024-01-27T23:38:13.065288Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculated number media interacted with for user 135
[backend] 2024-01-27T23:38:13.070514Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculated number exercises interacted with for user 0
IgnisDa commented 8 months ago

Here's the output

image

The machine has 12 gb of ram

So, for whatever reason, this is not being executed. Very weird, since it works when you query the database directly. Honestly, I am out of ideas to debug this.

Can you create a new user and then add a few random media to it and see if summary works for that?

ebiagi commented 8 months ago

I tried to:

1) create a new user and add some random media and recalculate -> same behaviour, no recalculation by the way, creating a new user throws the following error leading to an APPLICATION ERROR page:

[backend] 2024-01-28T14:11:07.547061Z DEBUG calculate_user_summary{user_id=2 calculate_from_beginning=true}: ryot::miscellaneous::resolver: Calculating numbers summary for user UserSummary { fitness: UserFitnessSummary { measurements_recorded: 0, exercises_interacted_with: 0, workouts: UserFitnessWorkoutSummary { recorded: 0, duration: 0, weight: 0 } }, media: UserMediaSummary { books: BooksSummary { pages: 0, read: 0 }, movies: MoviesSummary { runtime: 0, watched: 0 }, podcasts: PodcastsSummary { runtime: 0, played: 0, played_episodes: 0 }, shows: ShowsSummary { runtime: 0, watched: 0, watched_episodes: 0, watched_seasons: 0 }, video_games: VideoGamesSummary { played: 0 }, visual_novels: VisualNovelsSummary { played: 0, runtime: 0 }, audio_books: AudioBooksSummary { runtime: 0, played: 0 }, anime: AnimeSummary { episodes: 0, watched: 0 }, manga: MangaSummary { chapters: 0, read: 0 }, reviews_posted: 0, media_interacted_with: 0 }, calculated_on: 1970-01-01T00:00:00Z, unique_items: UserSummaryUniqueItems { audio_books: {}, anime: {}, manga: {}, books: {}, movies: {}, visual_novels: {}, video_games: {}, show_episodes: {}, show_seasons: {}, shows: {}, podcast_episodes: {}, podcasts: {} } }
[frontend] ClientError: Query Error: error occurred while decoding column 0: mismatched types; Rust type `core::option::Option<rust_decimal::decimal::Decimal>` (as SQL type `NUMERIC`) is not compatible with SQL type `FLOAT8`: {"response":{"data":null,"errors":[{"message":"Query Error: error occurred while decoding column 0: mismatched types; Rust type `core::option::Option<rust_decimal::decimal::Decimal>` (as SQL type `NUMERIC`) is not compatible with SQL type `FLOAT8`","locations":[{"line":2,"column":3}],"path":["registerUser"]}],"status":200,"headers":{}},"request":{"query":"mutation RegisterUser($input: UserInput!) {\n  registerUser(input: $input) {\n    __typename\n    ... on RegisterError {\n      error\n    }\n    ... on IdObject {\n      id\n    }\n  }\n}","variables":{"input":{"username":"xxxx","password":"xxxxx"}}}}
[frontend]     at makeRequest (file:///home/ryot/node_modules/graphql-request/src/index.ts:426:11)
[frontend]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[frontend]     at Object.register (file:///home/ryot/build/server/index.js?t=1706339409000:10982:32)
[frontend]     at Object.callRouteActionRR (/home/ryot/node_modules/@remix-run/server-runtime/dist/data.js:35:16)
[frontend]     at callLoaderOrAction (/home/ryot/node_modules/@remix-run/router/router.ts:4011:16)
[frontend]     at submit (/home/ryot/node_modules/@remix-run/router/router.ts:3131:16)
[frontend]     at queryImpl (/home/ryot/node_modules/@remix-run/router/router.ts:3066:22)
[frontend]     at Object.queryRoute (/home/ryot/node_modules/@remix-run/router/router.ts:3016:18)
[frontend]     at handleDataRequestRR (/home/ryot/node_modules/@remix-run/server-runtime/dist/server.js:119:20)
[frontend]     at requestHandler (/home/ryot/node_modules/@remix-run/server-runtime/dist/server.js:91:18) {
[frontend]   response: {
[frontend]     data: null,
[frontend]     errors: [ [Object] ],
[frontend]     status: 200,
[frontend]     headers: Headers { [Symbol(map)]: [Object: null prototype] }
[frontend]   },
[frontend]   request: {
[frontend]     query: 'mutation RegisterUser($input: UserInput!) {\n' +
[frontend]       '  registerUser(input: $input) {\n' +
[frontend]       '    __typename\n' +
[frontend]       '    ... on RegisterError {\n' +
[frontend]       '      error\n' +
[frontend]       '    }\n' +
[frontend]       '    ... on IdObject {\n' +
[frontend]       '      id\n' +
[frontend]       '    }\n' +
[frontend]       '  }\n' +
[frontend]       '}',
[frontend]     variables: { input: [Object] }
[frontend]   }
[frontend] }
[frontend] POST /settings/users?intent=register&_data=routes%2F_dashboard.settings.users 500 - - 217.998 ms

2) wipe and recreate a new db both with ryot and public schema -> same behaviour, no recalculation

I don't know , I'm behind an apache reverse proxy so some error occurs (look below during a new show search process) can it contribute to create the problem?

[proxy] {"level":"error","ts":1706451955.8216271,"logger":"http.handlers.reverse_proxy","msg":"aborting with incomplete response","upstream":"localhost:3000","duration":0.150737047,"request":{"remote_ip":"172.17.0.1","remote_port":"43250","client_ip":"172.17.0.1","proto":"HTTP/1.1","method":"GET","host":"views.piadiy.it","uri":"/media/search/show?query=f&_data=routes%2F_dashboard.media.%24action.%24lot","headers":{"Sec-Gpc":["1"],"Sec-Fetch-Site":["same-origin"],"X-Forwarded-Host":["xxxxx"],"X-Forwarded-Proto":["http"],"Sec-Ch-Ua":["\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Brave\";v=\"120\""],"Sec-Fetch-Mode":["cors"],"Sec-Ch-Ua-Platform":["\"Linux\""],"X-Forwarded-For":["172.17.0.1"],"Accept":["*/*"],"Sec-Fetch-Dest":["empty"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"],"Accept-Language":["it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7"],"Cookie":[],"Accept-Encoding":["gzip, deflate, br"],"Sec-Ch-Ua-Mobile":["?0"],"Referer":["https://xxxxx/media/search/show"]}},"error":"reading: context canceled"}
IgnisDa commented 8 months ago

Please show your entire docker compose file.

ebiagi commented 8 months ago

No docker compose, I'm launching it with

docker run --name ryot --restart always --env-file /home/docker-run/dockerenv/ryot.env -i -t -d -p 0.0.0.0:8000:8000 ghcr.io/ignisda/ryot:latest

where ryot.env is

DATABASE_URL=postgres://ryot:SECRETPASS@SECRETHOST:5432/ryot
TZ=Europe/Rome

with a rootless docker setup.

IgnisDa commented 8 months ago

Check the logs of the database container. Are there any error there?

ebiagi commented 8 months ago

No errors in the DB log :(

IgnisDa commented 8 months ago

Could you try the docker compose setup instead?

ebiagi commented 8 months ago

Nope, same results :(

IgnisDa commented 8 months ago

Honestly, i have run out of ideas. Would it be possible for you to give me ssh access to your server?

ebiagi commented 8 months ago

Upgraded from pg 13 to 15 and the problem vanished