great-expectations / great_expectations

Always know what to expect from your data.
https://docs.greatexpectations.io/
Apache License 2.0
9.88k stars 1.53k forks source link

[BUG] FastAPI + Great Expectations + MSSQL (requests accumulate in sleeping status) #9648

Closed IgorShcherbakov closed 1 month ago

IgorShcherbakov commented 6 months ago

If you run GE in a container (Kubernetes), then after performing checks in the database you can see requests in the “suspended” status. Is it possible to forcefully close all connections to the database after performing the checks?

Example query: SELECT sum(CASE WHEN ([PK_ID] IS NOT NULL) THEN 1 ELSE 0 END) AS [column_values.null.unexpected_count] FROM [#gx_temp_d56615b6]

Great Expectations Version: 0.18.8

IgorShcherbakov commented 6 months ago

The problem is in the "run" method of the "Checkpoint" class. Resources are not released.

IgorShcherbakov commented 6 months ago

There is no way to terminate the GE without ending the program completely. For example, context.engine.dispose() and context.connection.close().

molliemarie commented 1 month ago

Hello @IgorShcherbakov. With the launch of Great Expectations Core (GX 1.0), we are closing old issues posted regarding previous versions. Moving forward, we will focus our resources on supporting and improving GX Core (version 1.0 and beyond). If you find that an issue you previously reported still exists in GX Core, we encourage you to resubmit it against the new version. With more resources dedicated to community support, we aim to tackle new issues swiftly. For specific details on what is GX-supported vs community-supported, you can reference our integration and support policy.

To get started on your transition to GX Core, check out the GX Core quickstart (click “Full example code” tab to see a code example).

You can also join our upcoming community meeting on August 28th at 9am PT (noon ET / 4pm UTC) for a comprehensive rundown of everything GX Core, plus Q&A as time permits. Go to https://greatexpectations.io/meetup and click “follow calendar” to follow the GX community calendar.

Thank you for being part of the GX community and thank you for submitting this issue. We're excited about this new chapter and look forward to your feedback on GX Core. 🤗