By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,236 Members | 1,386 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,236 IT Pros & Developers. It's quick & easy.

DB2 UDF timeout

P: n/a
Hello,

1) On UDF timeout the timeout error is return to the caller, but what
happens
with the UDF's thread? - does it terminated via Windows
TerminateThread() or
db2 engine thread waits for the UDF to finish anyway?

2) another situation: what if UDF enters endless loop or deadlocks -
will db2 engine will terminate UDF thread then after timeout?

3) what happens with currently running UDFs on db2 engine process close
- will
it wait for all UDF to complete before closing?

4) UDF_TIME_OUT is documented only in some old docs - is still valid?

thanks, dmitry

Sep 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
dm***********@mail.ru wrote:
Hello,

1) On UDF timeout the timeout error is return to the caller, but what
happens
with the UDF's thread? - does it terminated via Windows
TerminateThread() or
db2 engine thread waits for the UDF to finish anyway?
What is a UDF timeout? DB2 LUW doesn't have anything like that.

Since you should not use threads in UDFs anyways (not supported), DB2
doesn't take any precautions. In particular, DB2 doesn't notice it when a
thread happily continues its processing.

With the return from the function, DB2 gets the control back. And since you
are using operating system facilities for your threads and not any
mechanism provided by DB2, you are on your own.
2) another situation: what if UDF enters endless loop or deadlocks -
will db2 engine will terminate UDF thread then after timeout?
No; DB2 will wait for the UDF - potentially endlessly.
3) what happens with currently running UDFs on db2 engine process close
- will
it wait for all UDF to complete before closing?
Depends on what "close" means to you. If you shut DB2 down, the db2agent or
db2fmp process will be terminated. And since these processes execute the
UDF, the UDF execution is terminated as well.
4) UDF_TIME_OUT is documented only in some old docs - is still valid?
No.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Sep 11 '06 #2

P: n/a
Hello.

UDF_TIME_OUT - parameter of iSeries (formerly OS/400) QAQQINI (query
options) file.
DB2s for iSeries and LUW are different things.
Hello,

1) On UDF timeout the timeout error is return to the caller, but what
happens
with the UDF's thread? - does it terminated via Windows
TerminateThread() or
db2 engine thread waits for the UDF to finish anyway?

2) another situation: what if UDF enters endless loop or deadlocks -
will db2 engine will terminate UDF thread then after timeout?

3) what happens with currently running UDFs on db2 engine process close
- will
it wait for all UDF to complete before closing?

4) UDF_TIME_OUT is documented only in some old docs - is still valid?

thanks, dmitry
Sep 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.