GitHub user dosubot[bot] added a comment to the discussion: When Gunicorn workers are set to more than 1, some workers will fail to load sqlalchemy.dialects:doris
<!-- Answer --> This error is usually caused by environment or packaging issues: each Gunicorn worker is a separate process and must have access to the Doris dialect plugin via the pydoris package. If some workers can't load `sqlalchemy.dialects:doris`, it's likely that pydoris isn't installed or registered correctly in the Python environment used by all workers, or the entry_point for the dialect is missing or broken. Superset relies on pydoris to register the dialect via Python packaging metadata, not on its own code—so this is typically an environment or packaging problem, not a Superset bug ([source](https://github.com/apache/superset/issues/34072)). To troubleshoot: 1. In the same environment where Superset runs, check that the Doris dialect is registered: ```python from importlib.metadata import entry_points eps = entry_points() dialects = eps.select(group='sqlalchemy.dialects') if hasattr(eps, 'select') else eps.get('sqlalchemy.dialects', []) print([f"{ep.name} = {ep.value}" for ep in dialects if 'doris' in ep.name]) ``` You should see something like `doris = pydoris.sqlalchemy.doris:DorisDialect`. If not, reinstall pydoris with `pip install --force-reinstall pydoris` and make sure you're using the same Python environment as Superset. 2. Make sure all Gunicorn workers use the same Python environment and have access to the same installed packages. If you're using Docker, virtualenv, or system Python, confirm that pydoris is installed in the environment where Gunicorn launches Superset. 3. If the dialect is registered but you still see errors, check your Doris SQLAlchemy URI. Superset expects a catalog in the URI; if it's missing, it defaults to `internal`, which can cause connection issues. Try a URI like `doris://user:pass@host:port/internal.schema` ([source](https://github.com/apache/superset/issues/34072)). 4. After making changes, restart all Gunicorn workers to ensure they pick up the correct environment and packages. If you follow these steps, it should resolve the plugin loading error for all workers. If the problem persists, there may be a deeper packaging or environment issue. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/218bc72c-0a84-4e3d-9d76-1fc560221083?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)& nbsp;[](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/35299) GitHub link: https://github.com/apache/superset/discussions/35299#discussioncomment-14517141 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
