appsmithorg / appsmith

Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
https://www.appsmith.com
Apache License 2.0
34.55k stars 3.73k forks source link

[Bug]: Move to Postgres - GCP URI - Performance issues #36269

Closed shadabbuchh closed 1 month ago

shadabbuchh commented 2 months ago

Is there an existing issue for this?

Description

We are noticing performance issues while doing basic actions such as creating applications, adding queries/JS Objects, deleting application & workspaces.

Steps To Reproduce

  1. Pull this image: appsmith/appsmith-ee:pg
  2. After the image is up and running go to Advanced section in Settings and replace the Appsmith DB URI with the GCP URI.
  3. Perform basic actions such as creating applications, adding queries/JS Objects, deleting application & workspaces.

Expected: There should be no performance lag & the time taken to perform all these actions should be on par with release.

Public Sample App

No response

Environment

Deploy Preview

Severity

High (Blocker to building or releasing)

Issue video log

https://jam.dev/c/4417ff82-a952-4388-b878-33261b000ca4

Version

Self hosted

abhvsn commented 2 months ago

@AnaghHegde just like we have expected this morning. Please take a look into this.

laveena-en commented 2 months ago

FYI @AnaghHegde performance issues are also being seen on git actions

RakshaKShetty commented 2 months ago

The time difference seen Generate page took 6.86s, while on release it takes 1.64s New page - 1.85s, while on release it is 213ms New DS Save and authorize click on. gsheets - 1.98s, while on release it is 254.94ms Create new application - 3.01s, while on release it is 472.36ms Import action to bring up the modal for a json file: 10.04s, while on release it is 1.13s for the same file

abhvsn commented 1 month ago

As per Anagh we are seeing the connection pool limit reached exception which is causing the DBOps to queue. We have reached devops to check tghe connection limit set on GCP to verify if this is the issue.

github-actions[bot] commented 1 month ago

This critical issue has not seen activity for a while. It will be closed in 7 days unless further activity is detected or the Critical tag is removed.

abhvsn commented 1 month ago

@RakshaKShetty @shadabbuchh let's retest this as we have moved the DB and VM with same provider, in same region. DP: http://34.93.159.52/applications

shadabbuchh commented 1 month ago

Verified actions such as creating applications, adding queries/JS Objects, deleting application & workspaces. The performance seems to have improved & is now at par with release. However there is still some lag in performance when trying to delete bigger applications: https://jam.dev/c/02eec56a-aaa6-4dd7-971b-0b4cfd00399f

Time taken to delete an app in release:

Screenshot 2024-09-24 at 12 20 36 PM

Time taken to delete an app in the new DP:

Screenshot 2024-09-24 at 12 20 23 PM
RakshaKShetty commented 1 month ago

image image

AnaghHegde commented 1 month ago

@RakshaKShetty Are we good to close this issue? The performance is on par with release.

RakshaKShetty commented 1 month ago

@AnaghHegde Did we fix the slowness seen on Delete application

AnaghHegde commented 1 month ago

@RakshaKShetty Can you check the dp now?

shadabbuchh commented 1 month ago

@AnaghHegde the delete performance issue is still reproducible in the DP. Also I see the error on importing apps that was fixed couple of days ago: https://jam.dev/c/17df82b5-c3d1-4d10-8e2e-0581596c8370

AnaghHegde commented 1 month ago

@shadabbuchh The delete issue is fixed in 4517. The gcp instance does not have latest code. Its the same since last week. I am not sure why the import is failing now.

shadabbuchh commented 1 month ago

Tried it on 4517 as well. There seems to be a lag in deleting the apps: https://jam.dev/c/1f7c54c1-3f0a-48ee-9eae-fe9cddd45520 DP:

Screenshot 2024-09-26 at 3 37 04 PM

Release:

Screenshot 2024-09-26 at 3 37 26 PM
AnaghHegde commented 1 month ago

36650 can be used to tackle the performance issues.