-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: [aforce] Memory leak issue in Appsmith's database integration causing website downtime. #34028
Comments
The root cause of this issue is still unknown as we tried reproducing this issue by:
|
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. |
Memory leak happens in our prod app (this github issue is the result of my communication with support). Let me know if there is any additional information we can provide to troubleshoot. |
@okletsov We have struggled to reproduce the error situation, so any clues or suggestions would help to make our debugging easier. |
@okletsov Thank you so much for your patience. Further more, I am creating action item here to add more logs to observe the nature of connection pool to understand active connections, connection pool size etc |
Hello sneha,
I will have a chance to jump on it today. I believe we have one data source
(in appsmith interface). Can send you some screenshots later today.
Thank you,
Oleksii Kletsov
…On Wed, Jul 24, 2024, 6:59 AM sneha122 ***@***.***> wrote:
@okletsov <https://github.com/okletsov> Thank you so much for your
patience.
I have gone through the code to understand the potential causes of
connections not being released and eventually causing memory leak, I wanted
to understand the nature of datasources and queries you have in your
application that are running on page load.
My hunch right now is that you may have multiple datasources (connecting
to same db) having queries on page load, this can cause creation of
multiple connection pools to same database and end up exhausting
connections on that database. Hence If you can let me know if the 11
queries that running page load, do they belong to same datasource or they
belong to different datasources (connecting to same db)?
Further more, I am creating action item here
<#35158> to add more logs
to observe the nature of connection pool to understand active connections,
connection pool size etc
—
Reply to this email directly, view it on GitHub
<#34028 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJLX4ZAVBN3HZGLUPHSO4VTZN6CIJAVCNFSM6AAAAABI4OWC2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBXGYYDSMZVGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi Snrha,
Please see the datasource configuration attached.
The queries themselves are simple "select * from tableName" queries.
"tableName" for many of them is the View created on the DB server.
[image: image.png]
Thanks,
Oleksii Kletsov
On Sat, Jul 27, 2024 at 8:50 AM Oleksii Kletsov ***@***.***>
wrote:
… Hello sneha,
I will have a chance to jump on it today. I believe we have one data
source (in appsmith interface). Can send you some screenshots later today.
Thank you,
Oleksii Kletsov
On Wed, Jul 24, 2024, 6:59 AM sneha122 ***@***.***> wrote:
> @okletsov <https://github.com/okletsov> Thank you so much for your
> patience.
> I have gone through the code to understand the potential causes of
> connections not being released and eventually causing memory leak, I wanted
> to understand the nature of datasources and queries you have in your
> application that are running on page load.
> My hunch right now is that you may have multiple datasources (connecting
> to same db) having queries on page load, this can cause creation of
> multiple connection pools to same database and end up exhausting
> connections on that database. Hence If you can let me know if the 11
> queries that running page load, do they belong to same datasource or they
> belong to different datasources (connecting to same db)?
>
> Further more, I am creating action item here
> <#35158> to add more logs
> to observe the nature of connection pool to understand active connections,
> connection pool size etc
>
> —
> Reply to this email directly, view it on GitHub
> <#34028 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJLX4ZAVBN3HZGLUPHSO4VTZN6CIJAVCNFSM6AAAAABI4OWC2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBXGYYDSMZVGY>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
## Description This PR adds logs around connection pool metrics in order to debug memory leak issue #34028 Following metrics are logged for Get strcuture and Excute query calls: - Acquired - It indicates number of connections acquired from pool - Idle - Number of connections sitting idle in the connection pool - Allocated - Number of connections active / idle in the pool - Pending - Number of connections pending to be acquired. This information can help us understand if connections are not being released from the pool leading to memory leak. Fixes #35158 _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Datasource" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10148654649> > Commit: 2588f79 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10148654649&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Datasource` > Spec: > <hr>Mon, 29 Jul 2024 17:38:32 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced logging capabilities for the MySqlPlugin connection pool metrics, improving observability during database operations. - **Bug Fixes** - Improved monitoring tools to help identify potential memory leak issues related to connection pool usage. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: “sneha122” <“sneha@appsmith.com”>
Hi Sneha,
Done. Scheduled a call for Thursday. Talk to you then.
The screen shot was just trying to show the fact there is 1 data source in
our appsmith application. We can discuss more when we meet.
Thanks,
Oleksii Kletsov
…On Mon, Jul 29, 2024 at 6:07 AM sneha122 ***@***.***> wrote:
Hello @okletsov <https://github.com/okletsov>
Thanks a lot for the information provided. Unfortunately, I am not able to
see the image that you have attached, it would be great if you can schedule
call using this <https://calendly.com/d/cktt-vjj-4gz/30min> link. This
can quickly help us to analyse database connections.
—
Reply to this email directly, view it on GitHub
<#34028 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJLX4ZGSO5ELGUO7SFRJMQ3ZOYH5JAVCNFSM6AAAAABI4OWC2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJVGUZDENZUHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello, appsmith team. Any updates on the issue? We are back to the busy season with this memory leak issue bringing our website down 2-3 times a week. |
Hi @okletsov Thanks a lot for reaching out again! I deeply apologise that we haven't been able to follow up on this due to other priorities. If possible, could you please help us by sharing the application json (You can do this by exporting the app) with us and read only DB access as discussed in last call? You can share these details with us over email using support@appsmith.com For context on what we discussed during last call:
|
Hello Sneha, Couple clarifications/corrections:
Everything else is correct. I just sent the DB connection info as well as the app JSON to the email. |
Thanks @okletsov Will update the details and check out the issue as well |
@okletsov the fix for this issue has reached appsmith production (app.appsmith.com), can you please confirm if it is working for you? |
Hello Nilansh,
Unfortunately the fix didn't help. Memory consumption doesn't go down.
Thanks,
Oleksii Kletsov
…On Thu, Oct 10, 2024 at 2:05 AM Nilansh Bansal ***@***.***> wrote:
@okletsov <https://github.com/okletsov> the fix for this issue has
reached appsmith production (app.appsmith.com), can you please confirm if
it is working for you?
cc: @rohan-arthur <https://github.com/rohan-arthur> @pranavkanade
<https://github.com/pranavkanade> @ame-appsmith
<https://github.com/ame-appsmith> @LagunaElectric
<https://github.com/LagunaElectric>
—
Reply to this email directly, view it on GitHub
<#34028 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJLX4ZA7J75N776MRRIREHTZ2YKKZAVCNFSM6AAAAABI4OWC2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBUGEYTEMRZGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
To add more details. As soon as you let us know the fix was live we
rebooted our server to allow for a clean experiment. We kept monitoring the
server memory consumption by mariaDB instance that appsmith has access to.
We didn't notice any improvements. In fact we think the memory consumption
goes up faster than prior to the fix. However we lack sufficient data
metrics to demonstrate it.
Looks like more digging is needed. Let us know how else can we help with
troubleshooting.
Thanks,
Oleksii Kletsov
On Thu, Oct 10, 2024 at 8:49 PM Oleksii Kletsov ***@***.***>
wrote:
… Hello Nilansh,
Unfortunately the fix didn't help. Memory consumption doesn't go down.
Thanks,
Oleksii Kletsov
On Thu, Oct 10, 2024 at 2:05 AM Nilansh Bansal ***@***.***>
wrote:
> @okletsov <https://github.com/okletsov> the fix for this issue has
> reached appsmith production (app.appsmith.com), can you please confirm
> if it is working for you?
> cc: @rohan-arthur <https://github.com/rohan-arthur> @pranavkanade
> <https://github.com/pranavkanade> @ame-appsmith
> <https://github.com/ame-appsmith> @LagunaElectric
> <https://github.com/LagunaElectric>
>
> —
> Reply to this email directly, view it on GitHub
> <#34028 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJLX4ZA7J75N776MRRIREHTZ2YKKZAVCNFSM6AAAAABI4OWC2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBUGEYTEMRZGM>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Thank You for the details @okletsov. I have reopened this issue to debug further. |
Is there an existing issue for this?
Description
slack link
Steps To Reproduce
no clear reproduction steps
Public Sample App
No response
Environment
Production
Severity
High (Blocker to building or releasing)
Issue video log
No response
Version
Self hosted
The text was updated successfully, but these errors were encountered: