Git Product home page Git Product logo

Comments (8)

paoliniluis avatar paoliniluis commented on July 18, 2024

can you get the query that metabase does to the db when it fires that query?

it seems like it's

SELECT decode(PERC_META,null,' ',to_char(PERC_META,'fm999G990D00') || '%') PERC_META\nFROM SA_ATENA.VW_META_SERVENTIAS S\nWHERE \n (CODIGO_SERVENTIA IS NULL [AND {ZONA_ELEITORAL} IS NULL]) \n[OR (NUM_ZE = LPAD({ZONA_ELEITORAL},3,'0'))]\nAND CD_META = 'META1'*/\n\nSELECT \n    META1 PERC_META\nFROM \n    SA_ATENA.VW_META_INDICADOR_VALOR_SERVENTIA\nWHERE \n    1=1\n    [[AND ZONA_NUMERO = LPAD({{ZONA_ELEITORAL}},3,'0')]]

but I want to know how it's finally compiled before reaching the DW

from metabase.

tatusis avatar tatusis commented on July 18, 2024

Hi, thanks for getting back to us. This query is in the log, yes, but we believe it is a Metabase issue in general. Because the error happens with other queries in other databases. In short, from some point onwards all queries in all databases give this same error.

The error below is from the same day and happens with another query accessing another database.

2024-06-05 10:29:54,389 ERROR middleware.catch-exceptions :: Erro ao processar a consulta: ORA-00604: ocorrência de erro a nível de instrução de SQL recursiva 1
ORA-01756: cadeia de caracteres entre aspas/plicas não terminada corretamente

{:database_id 7,
 :started_at #t "2024-06-05T10:29:19.644683500-03:00[GMT-03:00]",
 :via
 [{:status :failed,
   :class com.mchange.v2.resourcepool.CannotAcquireResourceException,
   :error "A ResourcePool could not acquire a resource from its primary factory or source.",
   :stacktrace
   ["com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1507)"
    "com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)"
    "com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)"
    "com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)"
    "com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)"
    "com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)"
    "--> driver.sql_jdbc.execute$do_with_resolved_connection.invokeStatic(execute.clj:334)"
    "driver.sql_jdbc.execute$do_with_resolved_connection.invoke(execute.clj:318)"
    "driver.sql_jdbc.execute$fn__79305.invokeStatic(execute.clj:383)"
    "driver.sql_jdbc.execute$fn__79305.invoke(execute.clj:381)"
    "driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:693)"
    "driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:679)"
    "driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:690)"
    "driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:679)"
    "driver.sql_jdbc$fn__106894.invokeStatic(sql_jdbc.clj:78)"
    "driver.sql_jdbc$fn__106894.invoke(sql_jdbc.clj:76)"
    "driver.oracle$fn__121552.invokeStatic(oracle.clj:507)"
    "driver.oracle$fn__121552.invoke(oracle.clj:505)"
    "query_processor.context$executef.invokeStatic(context.clj:60)"
    "query_processor.context$executef.invoke(context.clj:49)"
    "query_processor.context.default$default_runf.invokeStatic(default.clj:44)"
    "query_processor.context.default$default_runf.invoke(default.clj:42)"
    "query_processor.context$runf.invokeStatic(context.clj:46)"
    "query_processor.context$runf.invoke(context.clj:40)"
    "query_processor.reducible$identity_qp.invokeStatic(reducible.clj:39)"
    "query_processor.reducible$identity_qp.invoke(reducible.clj:36)"
    "query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___72328.invoke(cache.clj:229)"
    "query_processor.middleware.permissions$check_query_permissions$fn__66677.invoke(permissions.clj:140)"
    "query_processor.middleware.enterprise$check_download_permissions_middleware$fn__72149.invoke(enterprise.clj:51)"
    "query_processor.middleware.enterprise$maybe_apply_column_level_perms_check_middleware$fn__72159.invoke(enterprise.clj:64)"
    "query_processor.middleware.mbql_to_native$mbql__GT_native$fn__71591.invoke(mbql_to_native.clj:24)"
    "query_processor$fn__73496$combined_post_process__73501$combined_post_process_STAR___73502.invoke(query_processor.clj:262)"
    "query_processor$fn__73496$combined_pre_process__73497$combined_pre_process_STAR___73498.invoke(query_processor.clj:259)"
    "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__66774.invoke(fetch_source_query.clj:303)"
    "query_processor.middleware.resolve_database_and_driver$resolve_driver_and_database_local_values$fn__72239$fn__72243.invoke(resolve_database_and_driver.clj:77)"
    "driver$do_with_driver.invokeStatic(driver.clj:97)"
    "driver$do_with_driver.invoke(driver.clj:92)"
    "query_processor.middleware.resolve_database_and_driver$resolve_driver_and_database_local_values$fn__72239.invoke(resolve_database_and_driver.clj:76)"
    "query_processor.middleware.store$initialize_store$fn__67401$fn__67402.invoke(store.clj:14)"
    "query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:169)"
    "query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
    "query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:158)"
    "query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
    "query_processor.middleware.store$initialize_store$fn__67401.invoke(store.clj:13)"
    "query_processor.middleware.resolve_database_and_driver$resolve_database$fn__72236.invoke(resolve_database_and_driver.clj:60)"
    "query_processor.middleware.normalize_query$normalize$fn__72541.invoke(normalize_query.clj:38)"
    "query_processor.middleware.enterprise$fn__72176$handle_audit_app_internal_queries__72177$fn__72179.invoke(enterprise.clj:96)"
    "query_processor.middleware.enterprise$handle_audit_app_internal_queries_middleware$fn__72187.invoke(enterprise.clj:103)"
    "query_processor.middleware.constraints$mark_needs_default_userland_constraints$fn__71302.invoke(constraints.clj:104)"
    "query_processor.middleware.process_userland_query$process_userland_query$fn__72472.invoke(process_userland_query.clj:156)"
    "query_processor.middleware.catch_exceptions$catch_exceptions$fn__73073.invoke(catch_exceptions.clj:171)"
    "query_processor.reducible$async_qp$qp_STAR___62893$thunk__62895.invoke(reducible.clj:126)"
    "query_processor.reducible$async_qp$qp_STAR___62893$fn__62897.invoke(reducible.clj:131)"]}
  {:status :failed,
   :class java.sql.SQLException,
   :error "Connections could not be acquired from the underlying database!",
   :stacktrace
   ["com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)"
    "com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)"
    "com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)"
    "--> driver.sql_jdbc.execute$do_with_resolved_connection.invokeStatic(execute.clj:334)"
    "driver.sql_jdbc.execute$do_with_resolved_connection.invoke(execute.clj:318)"
    "driver.sql_jdbc.execute$fn__79305.invokeStatic(execute.clj:383)"
    "driver.sql_jdbc.execute$fn__79305.invoke(execute.clj:381)"
    "driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:693)"
    "driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:679)"
    "driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:690)"
    "driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:679)"
    "driver.sql_jdbc$fn__106894.invokeStatic(sql_jdbc.clj:78)"
    "driver.sql_jdbc$fn__106894.invoke(sql_jdbc.clj:76)"
    "driver.oracle$fn__121552.invokeStatic(oracle.clj:507)"
    "driver.oracle$fn__121552.invoke(oracle.clj:505)"
    "query_processor.context$executef.invokeStatic(context.clj:60)"
    "query_processor.context$executef.invoke(context.clj:49)"
    "query_processor.context.default$default_runf.invokeStatic(default.clj:44)"
    "query_processor.context.default$default_runf.invoke(default.clj:42)"
    "query_processor.context$runf.invokeStatic(context.clj:46)"
    "query_processor.context$runf.invoke(context.clj:40)"
    "query_processor.reducible$identity_qp.invokeStatic(reducible.clj:39)"
    "query_processor.reducible$identity_qp.invoke(reducible.clj:36)"
    "query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___72328.invoke(cache.clj:229)"
    "query_processor.middleware.permissions$check_query_permissions$fn__66677.invoke(permissions.clj:140)"
    "query_processor.middleware.enterprise$check_download_permissions_middleware$fn__72149.invoke(enterprise.clj:51)"
    "query_processor.middleware.enterprise$maybe_apply_column_level_perms_check_middleware$fn__72159.invoke(enterprise.clj:64)"
    "query_processor.middleware.mbql_to_native$mbql__GT_native$fn__71591.invoke(mbql_to_native.clj:24)"
    "query_processor$fn__73496$combined_post_process__73501$combined_post_process_STAR___73502.invoke(query_processor.clj:262)"
    "query_processor$fn__73496$combined_pre_process__73497$combined_pre_process_STAR___73498.invoke(query_processor.clj:259)"
    "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__66774.invoke(fetch_source_query.clj:303)"
    "query_processor.middleware.resolve_database_and_driver$resolve_driver_and_database_local_values$fn__72239$fn__72243.invoke(resolve_database_and_driver.clj:77)"
    "driver$do_with_driver.invokeStatic(driver.clj:97)"
    "driver$do_with_driver.invoke(driver.clj:92)"
    "query_processor.middleware.resolve_database_and_driver$resolve_driver_and_database_local_values$fn__72239.invoke(resolve_database_and_driver.clj:76)"
    "query_processor.middleware.store$initialize_store$fn__67401$fn__67402.invoke(store.clj:14)"
    "query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:169)"
    "query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
    "query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:158)"
    "query_processor.store$do_with_metadata_provider.invoke(store.clj:150)"
    "query_processor.middleware.store$initialize_store$fn__67401.invoke(store.clj:13)"
    "query_processor.middleware.resolve_database_and_driver$resolve_database$fn__72236.invoke(resolve_database_and_driver.clj:60)"
    "query_processor.middleware.normalize_query$normalize$fn__72541.invoke(normalize_query.clj:38)"
    "query_processor.middleware.enterprise$fn__72176$handle_audit_app_internal_queries__72177$fn__72179.invoke(enterprise.clj:96)"
    "query_processor.middleware.enterprise$handle_audit_app_internal_queries_middleware$fn__72187.invoke(enterprise.clj:103)"
    "query_processor.middleware.constraints$mark_needs_default_userland_constraints$fn__71302.invoke(constraints.clj:104)"
    "query_processor.middleware.process_userland_query$process_userland_query$fn__72472.invoke(process_userland_query.clj:156)"
    "query_processor.middleware.catch_exceptions$catch_exceptions$fn__73073.invoke(catch_exceptions.clj:171)"
    "query_processor.reducible$async_qp$qp_STAR___62893$thunk__62895.invoke(reducible.clj:126)"
    "query_processor.reducible$async_qp$qp_STAR___62893$fn__62897.invoke(reducible.clj:131)"],
   :state nil}],
 :action_id nil,
 :state "60000",
 :json_query
 {:constraints {:max-results 10000, :max-results-bare-rows 2000},
  :type :query,
  :middleware {:js-int-to-string? true, :ignore-cached-results? false, :process-viz-settings? false},
  :viz-settings nil,
  :database 7,
  :query {:source-table 79241},
  :parameters [],
  :async? true,
  :cache-ttl nil},
 :native
 {:query
  "SELECT * FROM (SELECT \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"ID\" \"ID\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"ORDEM\" \"ORDEM\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"TIPO\" \"TIPO\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"MATRICULA\" \"MATRICULA\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"TITULO\" \"TITULO\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"LOGIN\" \"LOGIN\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"NOME\" \"NOME\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"EMAIL\" \"EMAIL\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"CARGO\" \"CARGO\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"CD_LOTACAO\" \"CD_LOTACAO\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"LOTACAO\" \"LOTACAO\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"SITUACAO\" \"SITUACAO\", \"GUARDIAO\".\"HELPDESK_USUARIOS\".\"ACESSO\" \"ACESSO\" FROM \"GUARDIAO\".\"HELPDESK_USUARIOS\") WHERE rownum <= 2000",
  :params nil},
 :status :failed,
 :class java.sql.SQLException,
 :stacktrace
 ["oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:629)"
  "oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:558)"
  "oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:553)"
  "oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1376)"
  "oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:783)"
  "oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:771)"
  "oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:298)"
  "oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:451)"
  "oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTHWithO5Logon(T4CTTIoauthenticate.java:1565)"
  "oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1314)"
  "oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1268)"
  "oracle.jdbc.driver.T4CConnection.authenticateWithPassword(T4CConnection.java:1515)"
  "oracle.jdbc.driver.T4CConnection.authenticateUserForLogon(T4CConnection.java:1464)"
  "oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:676)"
  "oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:1088)"
  "oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:89)"
  "oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:732)"
  "oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:648)"
  "--> plugins.jdbc_proxy$proxy_driver$reify__84482.connect(jdbc_proxy.clj:37)"
  "connection_pool$proxy_data_source$reify__28702.getConnection(connection_pool.clj:29)"],
 :card_id 456,
 :context :question,
 :error
 "ORA-00604: ocorrência de erro a nível de instrução de SQL recursiva 1\nORA-01756: cadeia de caracteres entre aspas/plicas não terminada corretamente\n",
 :row_count 0,
 :running_time 0,
 :preprocessed
 {:constraints {:max-results 10000, :max-results-bare-rows 2000},
  :type :query,
  :middleware {:js-int-to-string? true, :ignore-cached-results? false, :process-viz-settings? false},
  :info
  {:executed-by 18,
   :context :question,
   :card-id 456,
   :card-name "Guardião - Servidores",
   :visualization-settings {:table.pivot-column "ORDEM", :table.cell-column "ID"}},
  :database 7,
  :query
  {:source-table 79241,
   :fields
   [[:field 490681 nil]
    [:field 490680 nil]
    [:field 490679 nil]
    [:field 490685 nil]
    [:field 490682 nil]
    [:field 490676 nil]
    [:field 490677 nil]
    [:field 490686 nil]
    [:field 490683 nil]
    [:field 490687 nil]
    [:field 490684 nil]
    [:field 490678 nil]
    [:field 490675 nil]],
   :limit 2000,
   :metabase.query-processor.middleware.limit/original-limit nil},
  :async? true},
 :data {:rows [], :cols []}}

from metabase.

tatusis avatar tatusis commented on July 18, 2024

Regarding your question, follow the query below, I just ran it in Metabase without errors.

/*SELECT decode(PERC_META,null,' ',to_char(PERC_META,'fm999G990D00') || '%') PERC_META
FROM SA_ATENA.VW_META_SERVENTIAS S
WHERE 
 (CODIGO_SERVENTIA IS NULL [AND {ZONA_ELEITORAL} IS NULL]) 
[OR (NUM_ZE = LPAD({ZONA_ELEITORAL},3,'0'))]
AND CD_META = 'META1'*/

SELECT 
    META1 PERC_META
FROM 
    SA_ATENA.VW_META_INDICADOR_VALOR_SERVENTIA
WHERE 
    1=1
    [[AND ZONA_NUMERO = LPAD({{ZONA_ELEITORAL}},3,'0')]]

from metabase.

tatusis avatar tatusis commented on July 18, 2024

Today we had the same error.

I don't know if it's related, but the log shows some entries with this message:

2024-06-06 08:39:44,942 ERROR middleware.catch-exceptions :: Erro ao processar a consulta: Closed

The maximum number of connections in the Metabase profile for this Oracle database is 20 sessions. Metabase is configured with the default of 15 sessions. Oracle's idle time is set to 40min.

Does Metabase have some kind of keep alive function? Does the metabase pool have some kind of default idle time for terminating sessions?

from metabase.

tatusis avatar tatusis commented on July 18, 2024

Today we had the same error.

java.sql.SQLException: Connections could not be acquired from the underlying database!
	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
	at metabase.driver.sql_jdbc.execute$do_with_resolved_connection.invokeStatic(execute.clj:334)
	at metabase.driver.sql_jdbc.execute$do_with_resolved_connection.invoke(execute.clj:318)
	at metabase.driver.sql_jdbc.execute$fn__79305.invokeStatic(execute.clj:383)
	at metabase.driver.sql_jdbc.execute$fn__79305.invoke(execute.clj:381)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:693)
	at metabase.driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:679)
	at metabase.driver.sql_jdbc.execute$execute_reducible_query.invokeStatic(execute.clj:690)
	at metabase.driver.sql_jdbc.execute$execute_reducible_query.invoke(execute.clj:679)
	at metabase.driver.sql_jdbc$fn__106894.invokeStatic(sql_jdbc.clj:78)
	at metabase.driver.sql_jdbc$fn__106894.invoke(sql_jdbc.clj:76)
	at metabase.driver.oracle$fn__121552.invokeStatic(oracle.clj:507)
	at metabase.driver.oracle$fn__121552.invoke(oracle.clj:505)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.query_processor.context$executef.invokeStatic(context.clj:60)
	at metabase.query_processor.context$executef.invoke(context.clj:49)
	at metabase.query_processor.context.default$default_runf.invokeStatic(default.clj:44)
	at metabase.query_processor.context.default$default_runf.invoke(default.clj:42)
	at metabase.query_processor.context$runf.invokeStatic(context.clj:46)
	at metabase.query_processor.context$runf.invoke(context.clj:40)
	at metabase.query_processor.reducible$identity_qp.invokeStatic(reducible.clj:39)
	at metabase.query_processor.reducible$identity_qp.invoke(reducible.clj:36)
	at metabase.query_processor.middleware.cache$maybe_return_cached_results$maybe_return_cached_results_STAR___72328.invoke(cache.clj:229)
	at metabase.query_processor.middleware.permissions$check_query_permissions$fn__66677.invoke(permissions.clj:140)
	at metabase.query_processor.middleware.enterprise$check_download_permissions_middleware$fn__72149.invoke(enterprise.clj:51)
	at metabase.query_processor.middleware.enterprise$maybe_apply_column_level_perms_check_middleware$fn__72159.invoke(enterprise.clj:64)
	at metabase.query_processor.middleware.mbql_to_native$mbql__GT_native$fn__71591.invoke(mbql_to_native.clj:24)
	at metabase.query_processor$fn__73496$combined_post_process__73501$combined_post_process_STAR___73502.invoke(query_processor.clj:262)
	at metabase.query_processor$fn__73496$combined_pre_process__73497$combined_pre_process_STAR___73498.invoke(query_processor.clj:259)
	at metabase.query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__66774.invoke(fetch_source_query.clj:303)
	at metabase.query_processor.middleware.resolve_database_and_driver$resolve_driver_and_database_local_values$fn__72239$fn__72243.invoke(resolve_database_and_driver.clj:77)
	at metabase.driver$do_with_driver.invokeStatic(driver.clj:97)
	at metabase.driver$do_with_driver.invoke(driver.clj:92)
	at metabase.query_processor.middleware.resolve_database_and_driver$resolve_driver_and_database_local_values$fn__72239.invoke(resolve_database_and_driver.clj:76)
	at metabase.query_processor.middleware.store$initialize_store$fn__67401$fn__67402.invoke(store.clj:14)
	at metabase.query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:169)
	at metabase.query_processor.store$do_with_metadata_provider.invoke(store.clj:150)
	at metabase.query_processor.store$do_with_metadata_provider.invokeStatic(store.clj:158)
	at metabase.query_processor.store$do_with_metadata_provider.invoke(store.clj:150)
	at metabase.query_processor.middleware.store$initialize_store$fn__67401.invoke(store.clj:13)
	at metabase.query_processor.middleware.resolve_database_and_driver$resolve_database$fn__72236.invoke(resolve_database_and_driver.clj:60)
	at metabase.query_processor.middleware.normalize_query$normalize$fn__72541.invoke(normalize_query.clj:38)
	at metabase.query_processor.middleware.enterprise$fn__72176$handle_audit_app_internal_queries__72177$fn__72179.invoke(enterprise.clj:96)
	at metabase.query_processor.middleware.enterprise$handle_audit_app_internal_queries_middleware$fn__72187.invoke(enterprise.clj:103)
	at metabase.query_processor.reducible$async_qp$qp_STAR___62893$thunk__62895.invoke(reducible.clj:126)
	at metabase.query_processor.reducible$async_qp$qp_STAR___62893$fn__62897.invoke(reducible.clj:131)
	at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1507)
	at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)
	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)
	... 53 more
Caused by: java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated

https://docs.oracle.com/error-help/db/ora-00604/
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:709)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:604)
	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:599)
	at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1807)
	at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:903)
	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:1101)
	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:409)
	at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:530)
	at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTHWithO5Logon(T4CTTIoauthenticate.java:1712)
	at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1459)
	at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:1399)
	at oracle.jdbc.driver.T4CConnection.authenticateWithPassword(T4CConnection.java:2048)
	at oracle.jdbc.driver.T4CConnection.authenticateUserForLogon(T4CConnection.java:1987)
	at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:1088)
	at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:1178)
	at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:105)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:886)
	at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:693)
	at metabase.plugins.jdbc_proxy$proxy_driver$reify__84482.connect(jdbc_proxy.clj:37)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:189)
	at metabase.connection_pool$proxy_data_source$reify__28702.getConnection(connection_pool.clj:29)
	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:161)
	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:147)
	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:202)
	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)
	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)
	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)

from metabase.

tatusis avatar tatusis commented on July 18, 2024

Hello, I would like to add some information to the reported problem:

The error only happens with Oracle databases.

After the error below:

2024-07-03 11:17:45,937 ERROR middleware.catch-exceptions :: Error processing query: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated

All queries against the same database receive the same error.

This error causes the application to display two errors:

A ResourcePool could not acquire a resource from its primary factory or source.

and

Connections could not be acquired from the underlying database!

If possible, I would like to know if you have already received other complaints about the same error or if it was possible to reproduce the error with the information provided and if there is any workaround.

from metabase.

tatusis avatar tatusis commented on July 18, 2024

Hello,
We disabled send pulse jobs and noticed a drastic reduction in the number of errors of this type. I am recording this information here as it may help identify the problem.

from metabase.

perivamsi avatar perivamsi commented on July 18, 2024

@tatusis thank you for that information, that certainly helps. we will continue to look into this issue.

from metabase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.