-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: ORA-01426: numeric overflow #322
Comments
Identify the point of failure and look at the data being processed. Let us know what you find. |
Thanks for your replay cjbj. Thanks & regards, |
I'll close this for the moment until you have more information. |
Dear CJBJ, If you find clues please let us know. This issue become big problem for me. :( Best regards, |
Keep working on it. When you identify some data which fails, post a testcase here and include the SQL to create tables, the PL/SQL etc. |
Hi, It seems like memory management for number bind out data type in node-oracledb lib is not efficient enough and causing numeric overflow error. |
'Efficient enough'? Can you explain? You could be hitting a boundary case where JS types and Oracle NUMBER (if that's what you were using) cannot represent the same values. Bottom line: please send a testcase so we can look at it. |
I'm using this "{type: oracledb.NUMBER, dir: oracledb.BIND_OUT}" to hold a return value. Test case is very simple, just create a sequence in oracle and use output variable to return it from stored procedure, now launch concurrent requests, at some point your'll receive this error, in my case I got this error when sequence returned a 5 digit number. |
@amjadparacha please send me the files that reproduce it. Thanks! |
@amjadparacha @sreenivasulun we couldn't reproduce it. Please send a testcase and/or give us all the detail possible: platforms, versions of OS, of Oracle client and DB, version of Node etc |
Hello @cjbj, thanks for your replies. Below are the softwares that I am using for my development,
I already posted above the pl/sql procedure, actual test data and my bindvars. Regards, |
@sreenivasulun 3 different people tried 3 different scripts and didn't reproduce it. Can you put together a complete testcase? Thanks. |
Sorry for the delayed response, I'm using following script, kindly execute it as per my defined use case above; var bindInsert = { function LogTransactionRequest(bindInsert, res, cb) {
} |
@amjadparacha We need the PL/SQL and the CREATE TABLE etc commands too. And with the platform and versions you are using we will have a better chance of reproducing it. Thanks. |
We ran into this issue a few days ago. I tried to build a minimal example to reproduce but it seems as if the error only occurs every now and then. We'll investigate further. |
@ronnn can you share details about OS, client, server & node versions, what kinds of datatypes you are using? |
Windows 7 Enterprise Service Pack 1 64bit We have serveral packages for data manipulation that are called from our models. Until now the error only popped up, when inserting a new record via a function inside one of these packages. The function returns a NUMBER (ID of the new record, generated from sequence). For example:
Called by:
Another team in our company is developing on a Linux virtual machine using the same node-modules and a similar application structure. They didn't receive the error so far. |
@sreenivasulun @ronnn Since we can't get a reproducable test case, could you try adding some logging code to help isolate the issue? Have a look at logger: https://github.com/OraOpenSource/Logger Once installed, you can add an exception handler like: exception
when others
then
logger.logError(); This will provide a lot of information in the logger_logs table. Also, you to pass in some context variables, such as the ids being returned, to help figure out what went wrong. |
@cjbj @dmcghan We added the Logger and it is logging all errors (unique constraints etc.) except the numeric overflow. The node output is as follows: EDIT
|
@ronnn Try adding a call to logger that logs the return value of USER_PKG.CREATE_USER just prior to returning it. Then check the log and you should find the value that is causing issues when you get an error. You may need to log some kind of context variable from the node code to help you associate the error with the log entry. |
@dmcghan We added log calls before and after every INSERT in all of our create functions and LOGGER_LOGS is only filled when no numeric overflow is thrown. Doesn't this indicate that the origin of the error is somewhere on the client side? |
@ronnn Can you do some logging inside the procedure to see what value(s) are supposed to be returned? |
@ronnn for completeness, what are your CREATE TABLE & CREATE SEQUENCE statements? |
@cjbj We already did that. Nothing is added to the log, when the error is thrown.
In this case (creation of user) next is doing nothing with the ID. At other places we use the ID to select the object and return it to the frontend. |
Stil haven't been able to reproduce. A complete testcase with data would be helpful. |
Closing this until someone comes up with a reproducible case. It's not clear if the problem still exists. |
Hi, Our application is also experiencing the same issue. Details are:
We are experiencing the issue intermittently, with various procedure calls that have NUMBER out-binds. Example logging info is:
Running that exact command immediately afterwards from SQLDeveloper:
Results in no errors and an output of:
We have a deployed version of the code on a Linux server, and now that I've read this chain I actually am wondering if we have ever seen this error there. We are going through SIT on our application now, so I will be keeping an eye out for this error in the application logs. Let me know if I can provide any additional information to help diagnose. |
Are you setting all 3 bind values in all PL/SQL code paths? PS I would recommend going to 1.9.3 for the various fixes it has |
Yes, those three out-binds are always set.
I can provide the PL/SQL for all of the procs and tables later today if that would be helpful - do you also need the nodejs code? I'm also updating our oracledb version now, thanks for the call out. |
@jhwetstone if all OUT binds are set in the PL/SQL block, then it probably isn't related to #344. I'd be interested in knowing whether you have seen it on Linux. All the reports so far have been on Windows. If can bundle up your schema & PL/SQL & JS into a runnable testcase we can throw some load at it and see if we can reproduce it. Email me (see profile) |
I just want to let you know that we also have this issue (with version I'm also on Windows 7. I can't provide any code for the moment, sadly. But I can add some logging or try some workarounds if it can help. I'm going to try to run the tests in Docker (based on the official Node image) to see if I'm able to reproduce the problem. |
I can now confirm that running exactly the same code from Docker works without any problem. The "numeric overflow" error only occurs when the |
It's been a while since we saw any reports of this. Windows is common to all. We do need a testcase that reproduces for us. I wonder if the future node-oracledb v2 will exhibit it? |
I know this is oldish but I am having this issue occur semi frequently (~10-20% of the time) I also was able to capture a memory dump with the exception that I can provide but would rather send securely(if necessary) Let me know if you would like any other info or for me to try anything else. |
This happens to me on OSX with instantclient-basic-macos.x64-11.2.0.4.0.zip, node 4.4.7, node-oracledb version 1.11.0. It's happened with two different calls, always with NUMBER out binds. It's been happening for months, going back to when I first tried this library (1.8). It's never happened in production (Linux). I'll upgrade node-oracledb and see. |
Hi All, ex; changed to Thanks, |
This happens sporadically for me too. It seems to happen most often on the first request after a period of inactivity. Node 7.5.0. If I retry the request, it tends to work first time. I've not been able to put together a reproducible test case: I too am on Windows 7 as a dev platform. I have scanned the available logs on my Linux box and don't see the error there either. |
@Pollocks01 thanks for letting us know. It's annoying. Have you tried v2? |
I am getting the following error, when I made a call to pl/sql procedure,
Error: ORA-01426: numeric overflow
at Error (native)
as follows my code snippet,
'''
var sqlQuery = "BEGIN oe_web_txns.pre_web_SaleTrx(:source,:merchantID,:deviceID,:UMI,:dbConverter,"+
":trxTime, :origPA,:initialTrxId,:entityId,:postableAmount,:redemptionType,:adjustedAmount,:xlsTrxId,:errorCode,:errorDescription); END;";
var bindvars = {
source: saleObject.source,
merchantID: saleObject.merchantID,
deviceID: saleObject.deviceID,
UMI: saleObject.UMI,
dbConverter:saleObject.dbConverter,
trxTime:saleObject.trxTime,
origPA:parseFloat(saleObject.origPA),
initialTrxId:parseFloat(saleObject.initialTrxId),
entityId:parseFloat(entityId),
postableAmount:parseFloat(postableAmount),
redemptionType:parseFloat(redemptionType),
adjustedAmount: { type: oracledb.NUMBER, dir : oracledb.BIND_OUT },
xlsTrxId: { type: oracledb.NUMBER, dir : oracledb.BIND_OUT },
errorCode: { type: oracledb.NUMBER, dir : oracledb.BIND_OUT },
errorDescription: { type: oracledb.STRING, dir : oracledb.BIND_OUT }
}
'''
Please give some hits to solve this error,
Best regards,
Sreeni
The text was updated successfully, but these errors were encountered: