Skip to content

Superset using duckdb connection encounter DB engine error #31978

Closed
@ivanonair

Description

@ivanonair

Bug description

When I use DuckDB to connect to MINIO to read data, I often encounter (not always) the following error:

"DB engine Error
This may be triggered by: Issue 1011 - Superset encountered an unexpected error."

or sometime error msg are

"upstream connect error or disconnect/reset before headers. reset reason: connection termination"

This seems to be related to having multiple filters on a dashboard. I observed that to generate the dropdown menu for each filter, a distinct SQL query is executed on the dataset for each filter. I suspect that this is causing many concurrent queries to be executed simultaneously when the dashboard is opened.

And there is also an error msg on superset server:

duckdb.duckdb.InvalidInputException: Invalid Input Error: No open result set.

The current probability of error occurrence is about fifty-fifty without changing any settings, not occur every time.

This leads to suspicions that it might be an issue with the rate limit or the number of threads. In the article below, I saw that when using duckdb.connect(:default:), it might induce error since running queries concurrently on the same connection is not supported.

duckdb.duckdb.InvalidInputException: Invalid Input Error: Attempting to execute an unsuccessful or closed pending query result

duckdb issue link

However, this is different from the error message I received, and I'm not sure if it's related. Has anyone else using Superset + DuckDB encountered a similar issue? Thanks."

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.10

DuckDB version

1.1.3

duckdb-engine version

0.15.0

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions