[ 
https://issues.apache.org/jira/browse/BEAM-9629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17070249#comment-17070249
 ] 

Ismaël Mejía commented on BEAM-9629:
------------------------------------

It seems that the default configuration for max connections in the pool was set 
to 1 
[https://github.com/apache/beam/commit/537cc5f6679a65851508b773ca273936d7b64ecf]

We should probably set a sensible value (10?) and enable users to configure 
this.

[~muscovite bob] thanks for reporting. Until a fix is out you can workaround 
this issue by using `JdbcIO.Read#withDataSourceProviderFn` and provide the 
detailed configuration (you would have to dig a bit in the code to understand 
the logic but it will work.
For ref 
https://github.com/apache/beam/blob/b58ba45a6b79341ad1a1a663efa7a18a413f05a7/sdks/java/io/jdbc/src/main/java/org/apache/beam/sdk/io/jdbc/JdbcIO.java#L1405

> JdbcIO seems to run out of connections in the connection pool and freezes 
> pipeline
> ----------------------------------------------------------------------------------
>
>                 Key: BEAM-9629
>                 URL: https://issues.apache.org/jira/browse/BEAM-9629
>             Project: Beam
>          Issue Type: Bug
>          Components: io-java-jdbc
>    Affects Versions: 2.19.0
>         Environment: Dataflow, Direct Runner on macOS Catalina.
>            Reporter: Boris Shilov
>            Assignee: Ismaël Mejía
>            Priority: Major
>              Labels: performance
>
> Greetings,
> I am using JdbcIO via the Scala wrappers provided in the Scio project. I am 
> trying to read a few dozen tables in parallel from MySQL, but above 8 
> concurrent SELECT operations the pipeline freezes. With help of the Scio 
> maintainers we've been able to isolate the issue as likely originating in 
> JdbcIO running out of connections in the connection pool and idling 
> indefinitely. The issue occurs both on the Direct Runner and Dataflow.
> Please see linked issue for more context: 
> https://github.com/spotify/scio/issues/2774



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to