Dear all,
In our application, we have built XSJS services to call various SQLScript procedures to perform various operations(integrate with R server etc.). One of such procedure is quite big and we are facing errors while executing it. The procedure contains:
1. Multiple SELECTs(30+) statements on various Analytic Views [3-4 records/rows retrieved per SELECT]
2. Multiple DELETEs(5+) statements from Tables
3. Multiple INSERTs(5+) statements into tables
4. Calling RLANG Procedure(by passing couple of tables & getting the result)
5. Multiple local variables(40+) are also used
6. Multiple IN (10+) parameters are passed(No result sent out)
7. Total lines of code: 700+
The same procedure works fine while executed from SQL Console. Whereas while calling it from XSJS we are getting different errors. All the other procedures called from XSJS works fine(They contain comparitively lesser lines of code).
Error 1) First time execution
InternalError: dberror(CallableStatement.execute): 3589 - remote query exuectuion failure: [3589] _SYS_BIC.xxxx.procedures/updateXXXX: line 62 col 5 (at pos 2844): GenericFailure exception: remote query exuectuion failure: [3589] _SYS_BIC.xxxx.procedures/callXXXX: line 194 col 5 (at pos 9604): GenericFailure exception: remote query exuectuion failure: ReadChannelException at BufferedIO.cpp(01097):
message: an error occured while reading from the channel
info: connection broken
param: 127.0.0.1:30003
Please check lines: 194, at ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_query.cc:809
Error 2) Second time execution(Same url refreshed again throws different error)
InternalError: dberror(CallableStatement.execute): 2576 - attempt to access metadata of an invalid address (already deleted or corrupted, etc.): [2576] _SYS_BIC.xxxx.procedures/updateXXXX: line 62 col 5 (at pos 2844): GenericFailure exception: attempt to access metadata of an invalid address (already deleted or corrupted, etc.): [2576] _SYS_BIC.xxxx.procedures/callXXXX: line 194 col 5 (at pos 9604): GenericFailure exception: attempt to access metadata of an invalid address (already deleted or corrupted, etc.): attempt to access metadata of an invalid address (already deleted or corrupted, etc.)Please check lines: 222, at ptime/query/plan_executor/trex_wrapper/trex_wrapper_body/trex_query.cc:809
Options tried:
1) Commenting lines of code (with ~200 lines of code it works, beyond that it starts failing)
2) No authorization problem as the same user id is used and other procedures call from XSJS are working fine.
Is there any limitations on the lines of code/memory in procedure while calling from XSJS? If i comment many lines it works regardless of the statements used.
Regards,
Chathia.