plane icon indicating copy to clipboard operation
plane copied to clipboard

[bug]: Issue boards take a long time to load, even if there are no issues in a project.

Open nickproud opened this issue 1 year ago • 26 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current behavior

When I open an issue list, whether it is list view or kanban, there is at least a 5 second load time. At first I thought it might be struggling to pull through issues, but I also noticed that this happens with a new project that has no issues. I wondered if there was a known bottleneck somewhere?

My host is a proxmox ubuntu vm. Quad core cpu and 6gb RAM. Plane is running in a docker container. Plane seems to idle at leass than 1% of CPU. When loading the issue board for a project, I see in proxmox that CPU is around 32% until loaded.

Steps to reproduce

  1. Open the relevant resource monitor on your host machine
  2. Note the idle CPU usage
  3. Open a project
  4. While issues board loads, note the CPU usage.

Environment

Production

Browser

Google Chrome

Variant

Self-Hosted

Version

v0.22-dev

nickproud avatar Jul 13 '24 10:07 nickproud

I experience exactly the same problem (also already mentioned on Discord). It only happens when loading issues and it doesn't matter if there are issues or not. There seems to be a bug in the backend which delays the server response (see screenshot). This should be fixed as it completely breaks usability.

image

RKLBusinessDevelopment avatar Jul 17 '24 08:07 RKLBusinessDevelopment

I have this issue as well. It's really unproductive for a productivity app

shellking4 avatar Jul 17 '24 12:07 shellking4

guys, are you on the Cloud and seeing this problem, especially @nickproud? because if you are, you shouldn't be seeing a version number or this trouble. we have pushed a fix proactively anyway. for self-hosted Plane, you are seeing this only on Empty states if i am not mistaken. we will ship a fix for this soon.

theparthacus avatar Jul 17 '24 13:07 theparthacus

Self-hosted version for me (and the others too, I guess). This problem is not only occuring on empty states. It happens for all items. It should be fixed as fast as possible, as Plane is not really usable with this bug.

RKLBusinessDevelopment avatar Jul 17 '24 13:07 RKLBusinessDevelopment

I'm on self-hosted. I am same as with @RKLBusinessDevelopment. This is not only occurring on empty states. It is happening for all items, whether empty or not.

nickproud avatar Jul 17 '24 13:07 nickproud

@nickproud, @RKLBusinessDevelopment are you using external DB or connecting to the pre configured database in docker ?

pablohashescobar avatar Jul 17 '24 14:07 pablohashescobar

the configured database for me. And I have the issue in both empty state and non-empty state

shellking4 avatar Jul 17 '24 14:07 shellking4

@nickproud, @RKLBusinessDevelopment are you using external DB or connecting to the pre configured database in docker ?

@pablohashescobar I'm using the pre-configured database in docker.

nickproud avatar Jul 17 '24 14:07 nickproud

Pre-configured database for me too.

RKLBusinessDevelopment avatar Jul 17 '24 14:07 RKLBusinessDevelopment

I encountered this using the container db or a postgresql server on baremetal. This with the db from the docker compose. This is from a fresh install, only changes are the port bindings and switched volumes to disk folders (on ssd). The server has 8 cores.

image image


x-app-env: &app-env
  environment:
    - NGINX_PORT=${NGINX_PORT:-80}
    - WEB_URL=${WEB_URL:-http://localhost}
    - DEBUG=${DEBUG:-0}
    - SENTRY_DSN=${SENTRY_DSN}
    - SENTRY_ENVIRONMENT=${SENTRY_ENVIRONMENT:-"production"}
    - CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
    # Gunicorn Workers
    - GUNICORN_WORKERS=${GUNICORN_WORKERS:-1}
    #DB SETTINGS
    - PGHOST=${PGHOST:-plane-db}
    - PGDATABASE=${PGDATABASE:-plane}
    - POSTGRES_USER=${POSTGRES_USER:-plane}
    - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-plane}
    - POSTGRES_DB=${POSTGRES_DB:-plane}
    - POSTGRES_PORT=${POSTGRES_PORT:-5432}
    - PGDATA=${PGDATA:-/var/lib/postgresql/data}
    - DATABASE_URL=${DATABASE_URL:-postgresql://plane:plane@plane-db/plane}
    # REDIS SETTINGS
    - REDIS_HOST=${REDIS_HOST:-plane-redis}
    - REDIS_PORT=${REDIS_PORT:-6379}
    - REDIS_URL=${REDIS_URL:-redis://plane-redis:6379/}
    # Application secret
    - SECRET_KEY=${SECRET_KEY:-60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5}
    # DATA STORE SETTINGS
    - USE_MINIO=${USE_MINIO:-1}
    - AWS_REGION=${AWS_REGION:-""}
    - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-"access-key"}
    - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY:-"secret-key"}
    - AWS_S3_ENDPOINT_URL=${AWS_S3_ENDPOINT_URL:-http://plane-minio:9000}
    - AWS_S3_BUCKET_NAME=${AWS_S3_BUCKET_NAME:-uploads}
    - MINIO_ROOT_USER=${MINIO_ROOT_USER:-"access-key"}
    - MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD:-"secret-key"}
    - BUCKET_NAME=${BUCKET_NAME:-uploads}
    - FILE_SIZE_LIMIT=${FILE_SIZE_LIMIT:-5242880}
    # Admin and Space URLs
    - ADMIN_BASE_URL=${ADMIN_BASE_URL}
    - SPACE_BASE_URL=${SPACE_BASE_URL}
    - APP_BASE_URL=${APP_BASE_URL}

services:
  web:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-frontend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: unless-stopped
    command: node web/server.js web
    ports:
      - '127.0.0.1:3000:3000'
    deploy:
      replicas: ${WEB_REPLICAS:-1}
    depends_on:
      - api
      - worker

  space:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-space:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: unless-stopped
    command: node space/server.js space
    ports:
      - '127.0.0.1:3002:3000'
    deploy:
      replicas: ${SPACE_REPLICAS:-1}
    depends_on:
      - api
      - worker
      - web

  admin:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-admin:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: unless-stopped
    command: node admin/server.js admin
    ports:
      - '127.0.0.1:3001:3000'
    deploy:
      replicas: ${ADMIN_REPLICAS:-1}
    depends_on:
      - api
      - web

  api:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: unless-stopped
    command: ./bin/docker-entrypoint-api.sh
    ports:
      - '127.0.0.1:8000:8000'
    deploy:
      replicas: ${API_REPLICAS:-1}
    volumes:
      - ./plane-data/logs_api:/code/plane/logs
    depends_on:
      - plane-db
      - plane-redis

  worker:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: unless-stopped
    command: ./bin/docker-entrypoint-worker.sh
    volumes:
      - ./plane-data/logs_worker:/code/plane/logs
    depends_on:
      - api
      - plane-db
      - plane-redis

  beat-worker:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: unless-stopped
    command: ./bin/docker-entrypoint-beat.sh
    volumes:
      - ./plane-data/logs_beat-worker:/code/plane/logs
    depends_on:
      - api
      - plane-db
      - plane-redis

  migrator:
    <<: *app-env
    image: ${DOCKERHUB_USER:-makeplane}/plane-backend:${APP_RELEASE:-stable}
    platform: ${DOCKER_PLATFORM:-}
    pull_policy: ${PULL_POLICY:-always}
    restart: "no"
    command: ./bin/docker-entrypoint-migrator.sh
    volumes:
      - ./plane-data/logs_migrator:/code/plane/logs
    depends_on:
      - plane-db
      - plane-redis

  plane-db:
    <<: *app-env
    image: postgres:15.5-alpine
    pull_policy: if_not_present
    restart: unless-stopped
    command: postgres -c 'max_connections=1000'
    volumes:
      - ./plane-data/pgdata:/var/lib/postgresql/data

  plane-redis:
    <<: *app-env
    image: valkey/valkey:7.2.5-alpine
    pull_policy: if_not_present
    restart: unless-stopped
    volumes:
      - ./plane-data/redisdata:/data

  plane-minio:
    <<: *app-env
    image: minio/minio:latest
    pull_policy: if_not_present
    restart: unless-stopped
    command: server /export --console-address ":9090"
    volumes:
      - ./plane-data/uploads:/export

  # Comment this if you already have a reverse proxy running
#  proxy:
#    <<: *app-env
#    image: ${DOCKERHUB_USER:-makeplane}/plane-proxy:${APP_RELEASE:-stable}
#    platform: ${DOCKER_PLATFORM:-}
#    pull_policy: ${PULL_POLICY:-always}
#    ports:
#      - ${NGINX_PORT}:80
#    depends_on:
#      - web
#      - api
#      - space

#volumes:
#  pgdata:
#  redisdata:
#  uploads:
#  logs_api:
#  logs_worker:
#  logs_beat-worker:
#  logs_migrator:

tgivslife avatar Jul 17 '24 16:07 tgivslife

When accessing https://host/dti/projects/5cbb57c1-74af-4c39-abe6-cc1010c3109e/issues/ these are the queries that are logged with execution time greater than 200ms


2024-07-18 07:15:07.106 UTC [43] LOG:  duration: 3226.504 ms  statement: SELECT * FROM ( SELECT DISTINCT "issues"."created_at" AS "col1", "issues"."updated_at" AS "col2", "issues"."created_by_id" AS "col3", "issues"."updated_by_id" AS "col4", "issues"."id" AS "col5", "issues"."project_id" AS "col6", "issues"."workspace_id" AS "col7", "issues"."parent_id" AS "col8", "issues"."state_id" AS "col9", "issues"."point" AS "col10", "issues"."estimate_point_id" AS "col11", "issues"."name" AS "col12", "issues"."description" AS "col13", "issues"."description_html" AS "col14", "issues"."description_stripped" AS "col15", "issues"."description_binary" AS "col16", "issues"."priority" AS "col17", "issues"."start_date" AS "col18", "issues"."target_date" AS "col19", "issues"."sequence_id" AS "col20", "issues"."sort_order" AS "col21", "issues"."completed_at" AS "col22", "issues"."archived_at" AS "col23", "issues"."is_draft" AS "col24", "issues"."external_source" AS "col25", "issues"."external_id" AS "col26", "cycle_issues"."cycle_id" AS "cycle_id", (SELECT Count(U0."id") AS "count" FROM "issue_links" U0 WHERE U0."issue_id" = ("issues"."id")) AS "link_count", (SELECT Count(U0."id") AS "count" FROM "issue_attachments" U0 WHERE U0."issue_id" = ("issues"."id")) AS "attachment_count", (SELECT Count(U0."id") AS "count" FROM "issues" U0 LEFT OUTER JOIN "inbox_issues" U1 ON (U0."id" = U1."issue_id") INNER JOIN "states" U2 ON (U0."state_id" = U2."id") INNER JOIN "projects" U3 ON (U0."project_id" = U3."id") WHERE ((U1."status" = 1 OR U1."status" =  -1 OR U1."status" = 2 OR U1."id" IS NULL) AND NOT U2."is_triage" AND NOT (U0."archived_at" IS NOT NULL) AND NOT (U3."archived_at" IS NOT NULL) AND NOT (U0."is_draft") AND U0."parent_id" = ("issues"."id"))) AS "sub_issues_count", COALESCE(ARRAY_AGG(DISTINCT "issue_assignees"."assignee_id" ) FILTER (WHERE NOT ("issue_assignees"."assignee_id" IS NULL)), '{}'::uuid[]) AS "assignee_ids", COALESCE(ARRAY_AGG(DISTINCT "issue_labels"."label_id" ) FILTER (WHERE NOT ("issue_labels"."label_id" IS NULL)), '{}'::uuid[]) AS "label_ids", COALESCE(ARRAY_AGG(DISTINCT "module_issues"."module_id" ) FILTER (WHERE NOT ("module_issues"."module_id" IS NULL)), '{}'::uuid[]) AS "module_ids", ROW_NUMBER() OVER (PARTITION BY "issues"."state_id" ORDER BY "issues"."sort_order" ASC NULLS LAST, "issues"."created_at" DESC) AS "row_number", "projects"."created_at" AS "col27", "projects"."updated_at" AS "col28", "projects"."created_by_id" AS "col29", "projects"."updated_by_id" AS "col30", "projects"."id" AS "col31", "projects"."name" AS "col32", "projects"."description" AS "col33", "projects"."description_text" AS "col34", "projects"."description_html" AS "col35", "projects"."network" AS "col36", "projects"."workspace_id" AS "col37", "projects"."identifier" AS "col38", "projects"."default_assignee_id" AS "col39", "projects"."project_lead_id" AS "col40", "projects"."emoji" AS "col41", "projects"."icon_prop" AS "col42", "projects"."module_view" AS "col43", "projects"."cycle_view" AS "col44", "projects"."issue_views_view" AS "col45", "projects"."page_view" AS "col46", "projects"."inbox_view" AS "col47", "projects"."cover_image" AS "col48", "projects"."estimate_id" AS "col49", "projects"."archive_in" AS "col50", "projects"."close_in" AS "col51", "projects"."logo_props" AS "col52", "projects"."default_state_id" AS "col53", "projects"."archived_at" AS "col54", "workspaces"."created_at" AS "col55", "workspaces"."updated_at" AS "col56", "workspaces"."created_by_id" AS "col57", "workspaces"."updated_by_id" AS "col58", "workspaces"."id" AS "col59", "workspaces"."name" AS "col60", "workspaces"."logo" AS "col61", "workspaces"."owner_id" AS "col62", "workspaces"."slug" AS "col63", "workspaces"."organization_size" AS "col64", T14."created_at" AS "col65", T14."updated_at" AS "col66", T14."created_by_id" AS "col67", T14."updated_by_id" AS "col68", T14."id" AS "col69", T14."project_id" AS "col70", T14."workspace_id" AS "col71", T14."parent_id" AS "col72", T14."state_id" AS "col73", T14."point" AS "col74", T14."estimate_point_id" AS "col75", T14."name" AS "col76", T14."description" AS "col77", T14."description_html" AS "col78", T14."description_stripped" AS "col79", T14."description_binary" AS "col80", T14."priority" AS "col81", T14."start_date" AS "col82", T14."target_date" AS "col83", T14."sequence_id" AS "col84", T14."sort_order" AS "col85", T14."completed_at" AS "col86", T14."archived_at" AS "col87", T14."is_draft" AS "col88", T14."external_source" AS "col89", T14."external_id" AS "col90", "states"."created_at" AS "col91", "states"."updated_at" AS "col92", "states"."created_by_id" AS "col93", "states"."updated_by_id" AS "col94", "states"."id" AS "col95", "states"."project_id" AS "col96", "states"."workspace_id" AS "col97", "states"."name" AS "col98", "states"."description" AS "col99", "states"."color" AS "col100", "states"."slug" AS "col101", "states"."sequence" AS "col102", "states"."group" AS "col103", "states"."is_triage" AS "col104", "states"."default" AS "col105", "states"."external_source" AS "col106", "states"."external_id" AS "col107" FROM "issues" LEFT OUTER JOIN "inbox_issues" ON ("issues"."id" = "inbox_issues"."issue_id") INNER JOIN "states" ON ("issues"."state_id" = "states"."id") INNER JOIN "projects" ON ("issues"."project_id" = "projects"."id") INNER JOIN "workspaces" ON ("issues"."workspace_id" = "workspaces"."id") LEFT OUTER JOIN "cycle_issues" ON ("issues"."id" = "cycle_issues"."issue_id") LEFT OUTER JOIN "issue_assignees" ON ("issues"."id" = "issue_assignees"."issue_id") LEFT OUTER JOIN "issue_labels" ON ("issues"."id" = "issue_labels"."issue_id") LEFT OUTER JOIN "module_issues" ON ("issues"."id" = "module_issues"."issue_id") LEFT OUTER JOIN "issues" T14 ON ("issues"."parent_id" = T14."id") WHERE (("inbox_issues"."status" = 1 OR "inbox_issues"."status" =  -1 OR "inbox_issues"."status" = 2 OR "inbox_issues"."id" IS NULL) AND NOT "states"."is_triage" AND NOT ("issues"."archived_at" IS NOT NULL) AND NOT ("projects"."archived_at" IS NOT NULL) AND NOT ("issues"."is_draft") AND "issues"."project_id" = '5cbb57c174af4c39abe6cc1010c3109e'::uuid AND "workspaces"."slug" = 'dti') GROUP BY 5, 27, 39, 67, 77, 103 ORDER BY "issues"."sort_order" ASC NULLS LAST, "issues"."created_at" DESC ) "qualify" WHERE ("row_number" > 0 AND "row_number" < 31) ORDER BY "col21" ASC NULLS LAST, "col1" DESC

2024-07-18 07:15:09.957 UTC [43] LOG:  duration: 2811.888 ms  statement: SELECT "col1", "col2", "col3", "col4", "col5", "col6", "col7", "col8", "col9", "col10", "col11", "col12", "col13", "col14", "col15", "col16", "col17", "col18", "col19", "cycle_id", "link_count", "attachment_count", "sub_issues_count", "assignee_ids", "label_ids", "module_ids" FROM ( SELECT * FROM ( SELECT DISTINCT "issues"."id" AS "col1", "issues"."name" AS "col2", "issues"."state_id" AS "col3", "issues"."sort_order" AS "col4", "issues"."completed_at" AS "col5", "issues"."estimate_point_id" AS "col6", "issues"."priority" AS "col7", "issues"."start_date" AS "col8", "issues"."target_date" AS "col9", "issues"."sequence_id" AS "col10", "issues"."project_id" AS "col11", "issues"."parent_id" AS "col12", "issues"."created_at" AS "col13", "issues"."updated_at" AS "col14", "issues"."created_by_id" AS "col15", "issues"."updated_by_id" AS "col16", "issues"."is_draft" AS "col17", "issues"."archived_at" AS "col18", "states"."group" AS "col19", "cycle_issues"."cycle_id" AS "cycle_id", (SELECT Count(U0."id") AS "count" FROM "issue_links" U0 WHERE U0."issue_id" = ("issues"."id")) AS "link_count", (SELECT Count(U0."id") AS "count" FROM "issue_attachments" U0 WHERE U0."issue_id" = ("issues"."id")) AS "attachment_count", (SELECT Count(U0."id") AS "count" FROM "issues" U0 LEFT OUTER JOIN "inbox_issues" U1 ON (U0."id" = U1."issue_id") INNER JOIN "states" U2 ON (U0."state_id" = U2."id") INNER JOIN "projects" U3 ON (U0."project_id" = U3."id") WHERE ((U1."status" = 1 OR U1."status" =  -1 OR U1."status" = 2 OR U1."id" IS NULL) AND NOT U2."is_triage" AND NOT (U0."archived_at" IS NOT NULL) AND NOT (U3."archived_at" IS NOT NULL) AND NOT (U0."is_draft") AND U0."parent_id" = ("issues"."id"))) AS "sub_issues_count", COALESCE(ARRAY_AGG(DISTINCT "issue_assignees"."assignee_id" ) FILTER (WHERE NOT ("issue_assignees"."assignee_id" IS NULL)), '{}'::uuid[]) AS "assignee_ids", COALESCE(ARRAY_AGG(DISTINCT "issue_labels"."label_id" ) FILTER (WHERE NOT ("issue_labels"."label_id" IS NULL)), '{}'::uuid[]) AS "label_ids", COALESCE(ARRAY_AGG(DISTINCT "module_issues"."module_id" ) FILTER (WHERE NOT ("module_issues"."module_id" IS NULL)), '{}'::uuid[]) AS "module_ids", ROW_NUMBER() OVER (PARTITION BY "issues"."state_id" ORDER BY "issues"."sort_order" ASC NULLS LAST, "issues"."created_at" DESC) AS "qual0" FROM "issues" LEFT OUTER JOIN "inbox_issues" ON ("issues"."id" = "inbox_issues"."issue_id") INNER JOIN "states" ON ("issues"."state_id" = "states"."id") INNER JOIN "projects" ON ("issues"."project_id" = "projects"."id") INNER JOIN "workspaces" ON ("issues"."workspace_id" = "workspaces"."id") LEFT OUTER JOIN "cycle_issues" ON ("issues"."id" = "cycle_issues"."issue_id") LEFT OUTER JOIN "issue_assignees" ON ("issues"."id" = "issue_assignees"."issue_id") LEFT OUTER JOIN "issue_labels" ON ("issues"."id" = "issue_labels"."issue_id") LEFT OUTER JOIN "module_issues" ON ("issues"."id" = "module_issues"."issue_id") WHERE (("inbox_issues"."status" = 1 OR "inbox_issues"."status" =  -1 OR "inbox_issues"."status" = 2 OR "inbox_issues"."id" IS NULL) AND NOT "states"."is_triage" AND NOT ("issues"."archived_at" IS NOT NULL) AND NOT ("projects"."archived_at" IS NOT NULL) AND NOT ("issues"."is_draft") AND "issues"."project_id" = '5cbb57c174af4c39abe6cc1010c3109e'::uuid AND "workspaces"."slug" = 'dti') GROUP BY 1, 20, 19 ORDER BY "issues"."sort_order" ASC NULLS LAST, "issues"."created_at" DESC ) "qualify" WHERE ("qual0" > 0 AND "qual0" < 31) ) "qualify_mask" ORDER BY "col4" ASC NULLS LAST, "col13" DESC

And these are the queries when viewing an issue with 8 sub-issues

2024-07-18 07:19:28.429 UTC [130] LOG:  duration: 2564.704 ms  statement: SELECT "issues"."created_at", "issues"."updated_at", "issues"."created_by_id", "issues"."updated_by_id", "issues"."id", "issues"."project_id", "issues"."workspace_id", "issues"."parent_id", "issues"."state_id", "issues"."point", "issues"."estimate_point_id", "issues"."name", "issues"."description", "issues"."description_html", "issues"."description_stripped", "issues"."description_binary", "issues"."priority", "issues"."start_date", "issues"."target_date", "issues"."sequence_id", "issues"."sort_order", "issues"."completed_at", "issues"."archived_at", "issues"."is_draft", "issues"."external_source", "issues"."external_id", "cycle_issues"."cycle_id" AS "cycle_id", (SELECT Count(U0."id") AS "count" FROM "issue_links" U0 WHERE U0."issue_id" = ("issues"."id")) AS "link_count", (SELECT Count(U0."id") AS "count" FROM "issue_attachments" U0 WHERE U0."issue_id" = ("issues"."id")) AS "attachment_count", (SELECT Count(U0."id") AS "count" FROM "issues" U0 LEFT OUTER JOIN "inbox_issues" U1 ON (U0."id" = U1."issue_id") INNER JOIN "states" U2 ON (U0."state_id" = U2."id") INNER JOIN "projects" U3 ON (U0."project_id" = U3."id") WHERE ((U1."status" = 1 OR U1."status" =  -1 OR U1."status" = 2 OR U1."id" IS NULL) AND NOT U2."is_triage" AND NOT (U0."archived_at" IS NOT NULL) AND NOT (U3."archived_at" IS NOT NULL) AND NOT (U0."is_draft") AND U0."parent_id" = ("issues"."id"))) AS "sub_issues_count", COALESCE(ARRAY_AGG(DISTINCT "issue_labels"."label_id" ) FILTER (WHERE NOT ("issue_labels"."label_id" IS NULL)), '{}'::uuid[]) AS "label_ids", COALESCE(ARRAY_AGG(DISTINCT "issue_assignees"."assignee_id" ) FILTER (WHERE (NOT ("issue_assignees"."assignee_id" IS NULL) AND "project_members"."is_active")), '{}'::uuid[]) AS "assignee_ids", COALESCE(ARRAY_AGG(DISTINCT "module_issues"."module_id" ) FILTER (WHERE NOT ("module_issues"."module_id" IS NULL)), '{}'::uuid[]) AS "module_ids", "states"."group" AS "state_group", "projects"."created_at", "projects"."updated_at", "projects"."created_by_id", "projects"."updated_by_id", "projects"."id", "projects"."name", "projects"."description", "projects"."description_text", "projects"."description_html", "projects"."network", "projects"."workspace_id", "projects"."identifier", "projects"."default_assignee_id", "projects"."project_lead_id", "projects"."emoji", "projects"."icon_prop", "projects"."module_view", "projects"."cycle_view", "projects"."issue_views_view", "projects"."page_view", "projects"."inbox_view", "projects"."cover_image", "projects"."estimate_id", "projects"."archive_in", "projects"."close_in", "projects"."logo_props", "projects"."default_state_id", "projects"."archived_at", "workspaces"."created_at", "workspaces"."updated_at", "workspaces"."created_by_id", "workspaces"."updated_by_id", "workspaces"."id", "workspaces"."name", "workspaces"."logo", "workspaces"."owner_id", "workspaces"."slug", "workspaces"."organization_size", T5."created_at", T5."updated_at", T5."created_by_id", T5."updated_by_id", T5."id", T5."project_id", T5."workspace_id", T5."parent_id", T5."state_id", T5."point", T5."estimate_point_id", T5."name", T5."description", T5."description_html", T5."description_stripped", T5."description_binary", T5."priority", T5."start_date", T5."target_date", T5."sequence_id", T5."sort_order", T5."completed_at", T5."archived_at", T5."is_draft", T5."external_source", T5."external_id", "states"."created_at", "states"."updated_at", "states"."created_by_id", "states"."updated_by_id", "states"."id", "states"."project_id", "states"."workspace_id", "states"."name", "states"."description", "states"."color", "states"."slug", "states"."sequence", "states"."group", "states"."is_triage", "states"."default", "states"."external_source", "states"."external_id" FROM "issues" LEFT OUTER JOIN "inbox_issues" ON ("issues"."id" = "inbox_issues"."issue_id") INNER JOIN "states" ON ("issues"."state_id" = "states"."id") INNER JOIN "projects" ON ("issues"."project_id" = "projects"."id") INNER JOIN "issues" T5 ON ("issues"."parent_id" = T5."id") INNER JOIN "workspaces" ON ("issues"."workspace_id" = "workspaces"."id") LEFT OUTER JOIN "cycle_issues" ON ("issues"."id" = "cycle_issues"."issue_id") LEFT OUTER JOIN "issue_labels" ON ("issues"."id" = "issue_labels"."issue_id") LEFT OUTER JOIN "issue_assignees" ON ("issues"."id" = "issue_assignees"."issue_id") LEFT OUTER JOIN "users" ON ("issue_assignees"."assignee_id" = "users"."id") LEFT OUTER JOIN "project_members" ON ("users"."id" = "project_members"."member_id") LEFT OUTER JOIN "module_issues" ON ("issues"."id" = "module_issues"."issue_id") WHERE (("inbox_issues"."status" = 1 OR "inbox_issues"."status" =  -1 OR "inbox_issues"."status" = 2 OR "inbox_issues"."id" IS NULL) AND NOT "states"."is_triage" AND NOT ("issues"."archived_at" IS NOT NULL) AND NOT ("projects"."archived_at" IS NOT NULL) AND NOT ("issues"."is_draft") AND "issues"."parent_id" = '0eedd9ed073b4d78bddca4ea3f953216'::uuid AND "workspaces"."slug" = 'dti') GROUP BY "issues"."id", 27, "projects"."id", "workspaces"."id", T5."id", "states"."id" ORDER BY "issues"."created_at" DESC

2024-07-18 07:19:31.176 UTC [133] LOG:  duration: 2551.709 ms  statement: SELECT "issues"."created_at", "issues"."updated_at", "issues"."created_by_id", "issues"."updated_by_id", "issues"."id", "issues"."project_id", "issues"."workspace_id", "issues"."parent_id", "issues"."state_id", "issues"."point", "issues"."estimate_point_id", "issues"."name", "issues"."description", "issues"."description_html", "issues"."description_stripped", "issues"."description_binary", "issues"."priority", "issues"."start_date", "issues"."target_date", "issues"."sequence_id", "issues"."sort_order", "issues"."completed_at", "issues"."archived_at", "issues"."is_draft", "issues"."external_source", "issues"."external_id", "cycle_issues"."cycle_id" AS "cycle_id", (SELECT Count(U0."id") AS "count" FROM "issue_links" U0 WHERE U0."issue_id" = ("issues"."id")) AS "link_count", (SELECT Count(U0."id") AS "count" FROM "issue_attachments" U0 WHERE U0."issue_id" = ("issues"."id")) AS "attachment_count", (SELECT Count(U0."id") AS "count" FROM "issues" U0 LEFT OUTER JOIN "inbox_issues" U1 ON (U0."id" = U1."issue_id") INNER JOIN "states" U2 ON (U0."state_id" = U2."id") INNER JOIN "projects" U3 ON (U0."project_id" = U3."id") WHERE ((U1."status" = 1 OR U1."status" =  -1 OR U1."status" = 2 OR U1."id" IS NULL) AND NOT U2."is_triage" AND NOT (U0."archived_at" IS NOT NULL) AND NOT (U3."archived_at" IS NOT NULL) AND NOT (U0."is_draft") AND U0."parent_id" = ("issues"."id"))) AS "sub_issues_count", COALESCE(ARRAY_AGG(DISTINCT "issue_labels"."label_id" ) FILTER (WHERE NOT ("issue_labels"."label_id" IS NULL)), '{}'::uuid[]) AS "label_ids", COALESCE(ARRAY_AGG(DISTINCT "issue_assignees"."assignee_id" ) FILTER (WHERE (NOT ("issue_assignees"."assignee_id" IS NULL) AND "project_members"."is_active")), '{}'::uuid[]) AS "assignee_ids", COALESCE(ARRAY_AGG(DISTINCT "module_issues"."module_id" ) FILTER (WHERE NOT ("module_issues"."module_id" IS NULL)), '{}'::uuid[]) AS "module_ids", "states"."group" AS "state_group", "projects"."created_at", "projects"."updated_at", "projects"."created_by_id", "projects"."updated_by_id", "projects"."id", "projects"."name", "projects"."description", "projects"."description_text", "projects"."description_html", "projects"."network", "projects"."workspace_id", "projects"."identifier", "projects"."default_assignee_id", "projects"."project_lead_id", "projects"."emoji", "projects"."icon_prop", "projects"."module_view", "projects"."cycle_view", "projects"."issue_views_view", "projects"."page_view", "projects"."inbox_view", "projects"."cover_image", "projects"."estimate_id", "projects"."archive_in", "projects"."close_in", "projects"."logo_props", "projects"."default_state_id", "projects"."archived_at", "workspaces"."created_at", "workspaces"."updated_at", "workspaces"."created_by_id", "workspaces"."updated_by_id", "workspaces"."id", "workspaces"."name", "workspaces"."logo", "workspaces"."owner_id", "workspaces"."slug", "workspaces"."organization_size", T5."created_at", T5."updated_at", T5."created_by_id", T5."updated_by_id", T5."id", T5."project_id", T5."workspace_id", T5."parent_id", T5."state_id", T5."point", T5."estimate_point_id", T5."name", T5."description", T5."description_html", T5."description_stripped", T5."description_binary", T5."priority", T5."start_date", T5."target_date", T5."sequence_id", T5."sort_order", T5."completed_at", T5."archived_at", T5."is_draft", T5."external_source", T5."external_id", "states"."created_at", "states"."updated_at", "states"."created_by_id", "states"."updated_by_id", "states"."id", "states"."project_id", "states"."workspace_id", "states"."name", "states"."description", "states"."color", "states"."slug", "states"."sequence", "states"."group", "states"."is_triage", "states"."default", "states"."external_source", "states"."external_id" FROM "issues" LEFT OUTER JOIN "inbox_issues" ON ("issues"."id" = "inbox_issues"."issue_id") INNER JOIN "states" ON ("issues"."state_id" = "states"."id") INNER JOIN "projects" ON ("issues"."project_id" = "projects"."id") INNER JOIN "issues" T5 ON ("issues"."parent_id" = T5."id") INNER JOIN "workspaces" ON ("issues"."workspace_id" = "workspaces"."id") LEFT OUTER JOIN "cycle_issues" ON ("issues"."id" = "cycle_issues"."issue_id") LEFT OUTER JOIN "issue_labels" ON ("issues"."id" = "issue_labels"."issue_id") LEFT OUTER JOIN "issue_assignees" ON ("issues"."id" = "issue_assignees"."issue_id") LEFT OUTER JOIN "users" ON ("issue_assignees"."assignee_id" = "users"."id") LEFT OUTER JOIN "project_members" ON ("users"."id" = "project_members"."member_id") LEFT OUTER JOIN "module_issues" ON ("issues"."id" = "module_issues"."issue_id") WHERE (("inbox_issues"."status" = 1 OR "inbox_issues"."status" =  -1 OR "inbox_issues"."status" = 2 OR "inbox_issues"."id" IS NULL) AND NOT "states"."is_triage" AND NOT ("issues"."archived_at" IS NOT NULL) AND NOT ("projects"."archived_at" IS NOT NULL) AND NOT ("issues"."is_draft") AND "issues"."parent_id" = '0eedd9ed073b4d78bddca4ea3f953216'::uuid AND "workspaces"."slug" = 'dti') GROUP BY "issues"."id", 27, "projects"."id", "workspaces"."id", T5."id", "states"."id" ORDER BY "issues"."created_at" DESC

tgivslife avatar Jul 18 '24 07:07 tgivslife

I have a similar situation, especially with sub-issues. sub-issues1 sub-issues2

kimielski avatar Jul 18 '24 07:07 kimielski

we are rewriting the issue queries and optimize the pagination logic.

pablohashescobar avatar Jul 18 '24 07:07 pablohashescobar

we are rewriting the issue queries and optimize the pagination logic.

Amazing. Much appreciated šŸ‘

nickproud avatar Jul 18 '24 08:07 nickproud

I today noticed after pulling latest that the issue seems to be gone, but this issue is still marked open, is this occuring more randomly, and the issue is still present, or was it forgotten to mark this as done? šŸ¤”

BlueSky-fur avatar Jul 25 '24 23:07 BlueSky-fur

I can't confirm this, I have updated to the latest version too and the issue is still present for me.

RKLBusinessDevelopment avatar Jul 26 '24 06:07 RKLBusinessDevelopment

I'm running the latest version and it is still extremely slow even on decent hardware, whether or not there are issues to load for the Project. I just got this running and I thought I did something wrong. Is there something I can do in the interim (before the code refactoring) to make the app faster? Would running Redis fix the query speeds at all?

jmessy919 avatar Jul 29 '24 16:07 jmessy919

maybe rollback to previous versions

akarabach avatar Jul 29 '24 18:07 akarabach

Thanks, everyone, for sharing your feedback and experiences. We are working on this—rewriting a few layers for performance. We’ll release an update shortly; your patience is appreciated.

vihar avatar Aug 12 '24 08:08 vihar

@vihar - thanks a lot, much appreciated.

Can you already say when it the update should ship? I just installed your amazing tool because we were looking for exactly this solution but right now it's hard to make the team excited about a tool, if they have to wait such a long time every time.

Thanks

csimlinger avatar Aug 24 '24 08:08 csimlinger

Thanks, everyone, for sharing your feedback and experiences. We are working on this—rewriting a few layers for performance. We’ll release an update shortly; your patience is appreciated.

I LOVE this service - Are there any updates regarding this issue? It'll make me love it even more (and if you want me to love it even more more, allow SSO for self hosting :))

tomerh2001 avatar Aug 26 '24 18:08 tomerh2001

Hi,

you can view the discussion here in discord.

we are working on saving the issues on client side and removing the logic of grouping from the backend container. we are still testing this approach.

pablohashescobar avatar Aug 27 '24 06:08 pablohashescobar

For anyone not having checked out the Discord discussion, you definitely should. There has been a great suggestion for a temporary fix from @icorbie on Discord that improves performance greatly.

A brief outline of what to do:

  1. Connect to the Plane Postgres Database using the CLI or a SQL Client
  2. Turn off the Postgres JIT option by running alter system set jit = 0;
  3. Apply the configuration change by running select pg_reload_conf();

lukaskruedel avatar Oct 04 '24 19:10 lukaskruedel

image when you switch the issue tables, the postgres will eat so many cpus. it could repeat by preview version, i have them all. image

i compare to cloud free version, i fount it won't, it faster then self-host version 2-3s to load all issue

elmagnificogi avatar Oct 30 '24 07:10 elmagnificogi

I am also facing the same issue on the preview latest version

AkoWu101 avatar Jan 21 '25 10:01 AkoWu101

I am also facing this issue but on the pages. This is on the self hosted version and i have updated to the latest version. A few versions ago this was not an issue. After a minute or 2 the page content shows.

Image

ariebombarie14 avatar Mar 13 '25 06:03 ariebombarie14

Still an issue in v0.26.0

ariebombarie14 avatar May 09 '25 09:05 ariebombarie14

also experiencing slow page load of pages in v0.26.0

dhop90 avatar May 13 '25 21:05 dhop90

All performance issues have been addressed in our recent releases. Please upgrade to the latest version, v0.27.1.

If you have any further questions, feel free to reopen this issue.

pushya22 avatar Jul 07 '25 08:07 pushya22