One Star

How to limit the job threads

Dear All,
We have a DI Job as a Web Service that calls several sub-jobs one after another.
The nature of a Web Service is its asynchronism and the Web Service client can start
any amount of web service requests one after another with the fatal consequences that
endless DI-Job-Threads come into being. Through this we get a problem with the database
connections:
java.sql.SQLExceptionSmiley SurprisedRA-01000: maximum open cursors exceeded
There are two choices to overcome this issue:
First we limit the threads of DI Jobs, but how can one web service request
make dormant and start again as soon as the number of running threads is
less than the maximum permitted threads.
Second all threads have access to a database connection pool.
I'd be very appreciated for any hints and help.
Kind regards
Hilderich
6 REPLIES
Four Stars

Re: How to limit the job threads

Hi Helderich,
Very good explanation is available at
http://stackoverflow.com/questions/12192592/java-sql-sqlexception-ora-01000-maximum-open-cursors-exc....
I think if we close the connection for respective DI job thread within himself after completion, we may not run into such problem.
How you are managing database connection in each DI job?
Thanks
Vaibhav
One Star

Re: How to limit the job threads

Hello sanvaibhav,
Thanks for your reply. In each (sub)job that cares for the database we use a tJDBCConnection and have the option activated for using a shared connection, that is an already existing connection or create a new one with a special name.
There is no auto commit enabled, instead we use the component tCommit and there is the option disabled to close the connection afterwards.
The parent job that includes the web service itself has no tJDBCConnection component and therefore it is not possible to close the connection after all other stuff has finished.
Kind regards
Hilderich
Moderator

Re: How to limit the job threads

Hi,
What the build version are you using? Talend Open Source or Enterprise Subscription Version? Would you mind sharing your current job design screenshot into forum?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: How to limit the job threads

Hi Helderich,
Following is something unexpected, something is wrong at some place or bug...
>>>
There is no auto commit enabled, instead we use the component tCommit and there is the option disabled to close the connection afterwards.
Thanks
Vaibhav
One Star

Re: How to limit the job threads

Hello All,
Now we follow another approach. We have removed the response from the beginning of the job and
instead give a response only when all stuff is done. But this isn't simple as it sounds because now
we have another problem with that approach. tLogCatcher in conjunction with tESBProviderFault
does not work:
http://www.talendforge.org/forum/viewtopic.php?id=35529
Kind Regards
Hilderich
Moderator

Re: How to limit the job threads

Hi hilderich,
There is a response in , would you mind checking it?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.