Failed to creat asking task| wren AI failed
I updated wren-ui:0.31.2 and wren-ai-service:0.27.12, I can't created new tasks right now.
The Log: wren-ui-1 | [2025-09-10T03:43:00.660] [DEBUG] WrenAIAdaptor - Wren AI: Deploy status: INDEXING wren-ui-1 | sendEvent modeling_deploy_mdl_failed { wren-ui-1 | mdl: { wren-ui-1 | schema: 'public', wren-ui-1 | catalog: 'wrenai', wren-ui-1 | dataSource: 'MSSQL', wren-ui-1 | models: [ wren-ui-1 | [Object], [Object], wren-ui-1 | [Object], [Object], wren-ui-1 | [Object], [Object], wren-ui-1 | [Object], [Object], wren-ui-1 | [Object], [Object], wren-ui-1 | [Object] wren-ui-1 | ], wren-ui-1 | relationships: [], wren-ui-1 | views: [], wren-ui-1 | enumDefinitions: undefined wren-ui-1 | }, wren-ui-1 | error: 'Wren AI: Deploy wren AI failed or timeout, hash: 3cba0af08e8e73c4861e2f4419489dc560c65bec'
construct_retrieval_results [src.pipelines.retrieval.db_schema_retrieval.construct_retrieval_results()] encountered an error< Node inputs: {'check_using_db_schemas_without_pruning': "<Task finished name='Task-321' " 'coro=<AsyncGraphAda...', 'construct_db_schemas': "<Task finished name='Task-320' " 'coro=<AsyncGraphAda...', 'dbschema_retrieval': "<Task finished name='Task-319' coro=<AsyncGraphAda...", 'filter_columns_in_tables': "<Task finished name='Task-323' " 'coro=<AsyncGraphAda...'}
Traceback (most recent call last): File "/app/.venv/lib/python3.12/site-packages/hamilton/async_driver.py", line 122, in new_fn await fn(**fn_kwargs) if asyncio.iscoroutinefunction(fn) else fn(**fn_kwargs) ^^^^^^^^^^^^^^^ File "/app/.venv/lib/python3.12/site-packages/langfuse/decorators/langfuse_decorator.py", line 256, in sync_wrapper self._handle_exception(observation, e) File "/app/.venv/lib/python3.12/site-packages/langfuse/decorators/langfuse_decorator.py", line 520, in _handle_exception raise e File "/app/.venv/lib/python3.12/site-packages/langfuse/decorators/langfuse_decorator.py", line 254, in sync_wrapper result = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/src/pipelines/retrieval/db_schema_retrieval.py", line 349, in construct_retrieval_results columns_and_tables_needed = orjson.loads( ^^^^^^^^^^^^^ orjson.JSONDecodeError: unexpected end of data: line 116 column 51 (char 5493)
Oh no an error! Need help with Hamilton? Join our slack and ask for help! https://join.slack.com/t/hamilton-opensource/shared_invite/zt-2niepkra8-DGKGf_tTYhXuJWBTXtIs4g
E0910 03:45:01.383 10 wren-ai-service:156] Request 06db2629-31dc-4209-a25b-01e91a5d1223: Error validating question: unexpected end of data: line 116 column 51 (char 5493) INFO: 172.18.0.7:39168 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:39178 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK E0910 03:45:03.346 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null. INFO: 172.18.0.7:39182 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:39196 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK I0910 03:45:04.854 10 wren-ai-service:108] Project ID: None SQL Functions Retrieval pipeline is running... I0910 03:45:04.863 10 wren-ai-service:116] Hit cache of SQL Functions for mssql I0910 03:45:04.872 10 wren-ai-service:193] SQL Generation pipeline is running... INFO: 172.18.0.7:39204 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:39214 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK I0910 03:45:06.891 10 wren-ai-service:108] Project ID: None SQL Functions Retrieval pipeline is running... I0910 03:45:06.895 10 wren-ai-service:116] Hit cache of SQL Functions for mssql I0910 03:45:06.904 10 wren-ai-service:193] SQL Generation pipeline is running... INFO: 172.18.0.7:39228 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK E0910 03:45:08.153 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null. INFO: 172.18.0.7:39240 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:44994 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:44996 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:44998 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45012 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45014 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45020 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45028 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45036 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45044 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:45048 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:56022 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:56036 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:56046 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:56056 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:56070 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK INFO: 172.18.0.7:56078 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK E0910 03:45:24.811 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null. INFO: 172.18.0.7:56092 - "GET /v1/question-recommendations/06db2629-31dc-4209-a25b-01e91a5d1223 HTTP/1.1" 200 OK E0910 03:45:26.645 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null. E0910 03:45:27.454 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null. E0910 03:45:32.642 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null. E0910 03:45:35.185 10 wren-ai-service:88] Error executing SQL: Cannot destructure property 'manifest' of '(intermediate value)' as it is null.
And my config.yaml is: type: llm provider: litellm_llm timeout: 120 models:
- alias: default model: openai/gpt-oss api_base: http://172.20.45.25:8000/v1 context_window_size: 8192 kwargs: max_tokens: 2048 temperature: 0 n: 1 seed: 0
type: embedder provider: litellm_embedder models:
- model: ollama/bge-m3-8k alias: default timeout: 600 api_base: http://ollama:11434
type: engine provider: wren_ui endpoint: http://wren-ui:3000
type: engine provider: wren_ibis endpoint: http://ibis-server:8000
type: document_store provider: qdrant location: http://qdrant:6333 embedding_model_dim: 1024 timeout: 120 recreate_index: true
type: pipeline pipes:
- name: db_schema_indexing embedder: litellm_embedder.default document_store: qdrant
- name: historical_question_indexing embedder: litellm_embedder.default document_store: qdrant
- name: table_description_indexing embedder: litellm_embedder.default document_store: qdrant
- name: db_schema_retrieval llm: litellm_llm.default embedder: litellm_embedder.default document_store: qdrant
- name: historical_question_retrieval embedder: litellm_embedder.default document_store: qdrant
- name: sql_generation llm: litellm_llm.default engine: wren_ui document_store: qdrant
- name: sql_correction llm: litellm_llm.default engine: wren_ui document_store: qdrant
- name: followup_sql_generation llm: litellm_llm.default engine: wren_ui document_store: qdrant
- name: sql_answer llm: litellm_llm.default
- name: semantics_description llm: litellm_llm.default
- name: relationship_recommendation llm: litellm_llm.default
- name: question_recommendation llm: litellm_llm.default
- name: question_recommendation_sql_generation llm: litellm_llm.default engine: wren_ui document_store: qdrant
- name: intent_classification llm: litellm_llm.default embedder: litellm_embedder.default document_store: qdrant
- name: misleading_assistance llm: litellm_llm.default
- name: data_assistance llm: litellm_llm.default
- name: sql_pairs_indexing document_store: qdrant embedder: litellm_embedder.default
- name: sql_pairs_retrieval document_store: qdrant embedder: litellm_embedder.default llm: litellm_llm.default
- name: preprocess_sql_data llm: litellm_llm.default
- name: sql_executor engine: wren_ui
- name: chart_generation llm: litellm_llm.default
- name: chart_adjustment llm: litellm_llm.default
- name: user_guide_assistance llm: litellm_llm.default
- name: sql_question_generation llm: litellm_llm.default
- name: sql_generation_reasoning llm: litellm_llm.default
- name: followup_sql_generation_reasoning llm: litellm_llm.default
- name: sql_regeneration llm: litellm_llm.default engine: wren_ui
- name: instructions_indexing embedder: litellm_embedder.default document_store: qdrant
- name: instructions_retrieval embedder: litellm_embedder.default document_store: qdrant
- name: sql_functions_retrieval engine: wren_ibis document_store: qdrant
- name: project_meta_indexing document_store: qdrant
- name: sql_tables_extraction llm: litellm_llm.default
- name: sql_diagnosis llm: litellm_llm.default
settings: doc_endpoint: https://docs.getwren.ai is_oss: true engine_timeout: 30 column_indexing_batch_size: 50 table_retrieval_size: 10 table_column_retrieval_size: 100 allow_intent_classification: true allow_sql_generation_reasoning: true allow_sql_functions_retrieval: true enable_column_pruning: false max_sql_correction_retries: 3 query_cache_maxsize: 1000 query_cache_ttl: 3600 langfuse_host: https://cloud.langfuse.com langfuse_enable: true logging_level: DEBUG development: false historical_question_retrieval_similarity_threshold: 0.9 sql_pairs_similarity_threshold: 0.7 sql_pairs_retrieval_max_size: 10 instructions_similarity_threshold: 0.7 instructions_top_k: 10
The config.yaml file is fine. It seems like some of data models I created cause this problem...
I have encountered the same problem as you. Could you tell me how your data model caused this issue?
I have encountered the same problem as you. Could you tell me how your data model caused this issue?
I cannot click the deploy button for my data model.
I have encountered the same problem as you. Could you tell me how your data model caused this issue?
Here’s a bit more context about my setup and what I think was going wrong: • The MSSQL database I connected is pretty big – around 900+ tables/schemas. • In the Wren UI init/modeling step, setting up PKs and relationships for all of them was way too much, so I basically skipped most of the manual PK/relationship config. • I’m not using OpenAI directly – I’m running my own LLM with vLLM, exposed as openai/gpt-oss through an OpenAI-compatible API. • On that vLLM server, the max_tokens limit was set quite low.
Because the schema is so large, the db_schema_retrieval / filter_columns_in_tables step needs the model to return a fairly long JSON listing tables and columns. With a huge schema + low max_tokens, the model’s JSON response was probably getting cut off, which led to:
orjson.JSONDecodeError: unexpected end of data
So the deploy/modeling never really finished. In the UI it just looked like the deploy failed or timed out, and I couldn’t create new tasks.
What I changed that made it at least run: • I increased the max_tokens limit on my vLLM deployment. • Then I re-ran the init/modeling for the project.
After that, the JSON stopped getting truncated, db_schema_retrieval could parse it, and the project finally initialized. It worked, but the SQL quality wasn’t great – which kind of makes sense with 900+ tables and almost no PK/relationship metadata set up.
A few thoughts / suggestions: • Maybe call out more clearly in the docs/UI that for large schemas, the LLM used for db_schema_retrieval / column pruning needs: • a high enough max_tokens, and • to return strict JSON only (no explanations or extra text). • When JSON parsing fails, it might be nicer to have a fallback (e.g. skip pruning or use the full schema) instead of the whole deploy failing. • For very big databases, it might help to recommend: • Splitting into multiple projects by domain instead of one giant project with 900+ tables; • Setting PKs and key relationships at least for the most important tables; • Optionally using a stronger / more reliable model just for initialization (schema + column pruning), and then switching back to a cheaper/self-hosted model for normal queries.
That’s roughly what I ran into, and how I worked around it by raising the max_tokens limit.
I have encountered the same problem as you. Could you tell me how your data model caused this issue?
Here’s a bit more context about my setup and what I think was going wrong: • The MSSQL database I connected is pretty big – around 900+ tables/schemas. • In the Wren UI init/modeling step, setting up PKs and relationships for all of them was way too much, so I basically skipped most of the manual PK/relationship config. • I’m not using OpenAI directly – I’m running my own LLM with vLLM, exposed as openai/gpt-oss through an OpenAI-compatible API. • On that vLLM server, the max_tokens limit was set quite low.
Because the schema is so large, the db_schema_retrieval / filter_columns_in_tables step needs the model to return a fairly long JSON listing tables and columns. With a huge schema + low max_tokens, the model’s JSON response was probably getting cut off, which led to:
orjson.JSONDecodeError: unexpected end of data
So the deploy/modeling never really finished. In the UI it just looked like the deploy failed or timed out, and I couldn’t create new tasks.
What I changed that made it at least run: • I increased the max_tokens limit on my vLLM deployment. • Then I re-ran the init/modeling for the project.
After that, the JSON stopped getting truncated, db_schema_retrieval could parse it, and the project finally initialized. It worked, but the SQL quality wasn’t great – which kind of makes sense with 900+ tables and almost no PK/relationship metadata set up.
A few thoughts / suggestions: • Maybe call out more clearly in the docs/UI that for large schemas, the LLM used for db_schema_retrieval / column pruning needs: • a high enough max_tokens, and • to return strict JSON only (no explanations or extra text). • When JSON parsing fails, it might be nicer to have a fallback (e.g. skip pruning or use the full schema) instead of the whole deploy failing. • For very big databases, it might help to recommend: • Splitting into multiple projects by domain instead of one giant project with 900+ tables; • Setting PKs and key relationships at least for the most important tables; • Optionally using a stronger / more reliable model just for initialization (schema + column pruning), and then switching back to a cheaper/self-hosted model for normal queries.
That’s roughly what I ran into, and how I worked around it by raising the max_tokens limit.
Thanks!But I just selected 6 tables, so theoretically, the number of my tables is already quite small, so it shouldn't exceed the limit. If the failure to run is caused by exceeding the max_token, then you should be able to run the official dataset, right? However, I can't get it to work.
I have encountered the same problem as you. Could you tell me how your data model caused this issue?
Here’s a bit more context about my setup and what I think was going wrong: • The MSSQL database I connected is pretty big – around 900+ tables/schemas. • In the Wren UI init/modeling step, setting up PKs and relationships for all of them was way too much, so I basically skipped most of the manual PK/relationship config. • I’m not using OpenAI directly – I’m running my own LLM with vLLM, exposed as openai/gpt-oss through an OpenAI-compatible API. • On that vLLM server, the max_tokens limit was set quite low. Because the schema is so large, the db_schema_retrieval / filter_columns_in_tables step needs the model to return a fairly long JSON listing tables and columns. With a huge schema + low max_tokens, the model’s JSON response was probably getting cut off, which led to: orjson.JSONDecodeError: unexpected end of data So the deploy/modeling never really finished. In the UI it just looked like the deploy failed or timed out, and I couldn’t create new tasks. What I changed that made it at least run: • I increased the max_tokens limit on my vLLM deployment. • Then I re-ran the init/modeling for the project. After that, the JSON stopped getting truncated, db_schema_retrieval could parse it, and the project finally initialized. It worked, but the SQL quality wasn’t great – which kind of makes sense with 900+ tables and almost no PK/relationship metadata set up. A few thoughts / suggestions: • Maybe call out more clearly in the docs/UI that for large schemas, the LLM used for db_schema_retrieval / column pruning needs: • a high enough max_tokens, and • to return strict JSON only (no explanations or extra text). • When JSON parsing fails, it might be nicer to have a fallback (e.g. skip pruning or use the full schema) instead of the whole deploy failing. • For very big databases, it might help to recommend: • Splitting into multiple projects by domain instead of one giant project with 900+ tables; • Setting PKs and key relationships at least for the most important tables; • Optionally using a stronger / more reliable model just for initialization (schema + column pruning), and then switching back to a cheaper/self-hosted model for normal queries. That’s roughly what I ran into, and how I worked around it by raising the max_tokens limit.
Thanks!But I just selected 6 tables, so theoretically, the number of my tables is already quite small, so it shouldn't exceed the limit. If the failure to run is caused by exceeding the max_token, then you should be able to run the official dataset, right? However, I can't get it to work.
Try to check the config.yaml and model settings, it might work. Good luck!