[
https://issues.apache.org/jira/browse/BEAM-7230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16838642#comment-16838642
]
Ismaël Mejía edited comment on BEAM-7230 at 5/13/19 3:56 PM:
-------------------------------------------------------------
[~brachi_packter] notice that in the provided function if you use
PoolableDatasource you MUST guarantee that the DataSource is constructed as a
static value, that way it will exist only once per JVM, otherwise you will be
building a Pool per DoFn and in streaming it will intend to do many connections
which is the core of this issue.
was (Author: iemejia):
[~brachi_packter] notice that in the provided function you MUST guarantee that
the DataSource is constructed as a static value, that way it will exist only
once per JVM, otherwise you will be building a Pool per DoFn and in streaming
it will intend to do many connections which will bring us back to the same
error here.
> Using JdbcIO creates huge amount of connections
> -----------------------------------------------
>
> Key: BEAM-7230
> URL: https://issues.apache.org/jira/browse/BEAM-7230
> Project: Beam
> Issue Type: Bug
> Components: runner-dataflow
> Affects Versions: 2.11.0
> Reporter: Brachi Packter
> Assignee: Ismaël Mejía
> Priority: Major
>
> I want to write form DataFlow to GCP cloud SQL, I'm using connection pool,
> and still I see huge amount of connections in GCP SQL (4k while I set
> connection pool to 300), and most of them in sleep.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)