ORA-29270: too many open HTTP requests
Hi,
We have a requirement like, we will get bulk data (2 GB) data file with different languages(Russian, chinese, Japanese, German) etc. and we need to load these data into our databse also we have to translate the same.
We are using Oracle 11g.
We had used Oracle httpuritype - And the below mentioned procedure PROCEDURE TEST.PRC_TRANS_GERMAN will call the function - trans_jef
Input parameter for PRC_TRANS_GERMAN - > To_language and from Language. and this procedure will store the translated word in the seperate table.
Input parameter for the function trans_jef - > Word to be translated , from languae, to_language. And this function will return the translated word.
The issue I am facing is when I am passing the table of around 10000 records, around 4000 rows are not getting translated. So when i try to capture the error in exception- the error is
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1819
ORA-29270: too many open HTTP requests
When I try to re execute the missed words, they were translated. But they are not getting translated in one go because of the too many http open request.
So could you please let me know how to resolve this ORA-29270 errror. I know we have to end the request and start again. But not sure how to do. Can some one help with this~!!!!
Translator
CREATE OR REPLACE FUNCTION trans_jef (v_RawText IN VARCHAR2,
v_SrcLang IN VARCHAR2,
v_DestLang IN VARCHAR2)
RETURN CLOB
IS
v_EscRawText VARCHAR2 (3000);
v_XlateUrl VARCHAR (3000);
--v_SrcLang Varchar(10) ;-- := 'de';
--v_DestLang Varchar(10) ; -- := 'en';
v_XlateResult CLOB;
l_result CLOB;
BEGIN
DBMS_OUTPUT.ENABLE (10000000);
v_EscRawText := UTL_URL.escape (v_RawText, TRUE, 'UTF-8');
v_XlateUrl :=
'http://translate.google.com/translate_a/t?client=t&text='
|| v_EscRawText
|| '&hl='
|| v_DestLang
|| '&sl='
|| v_SrcLang
|| '&tl='
|| v_DestLang
|| '&ie=UTF-8&oe=UTF-8&multires=1&oc=1&prev=btn&ssel=0&tsel=0&sc=1';
v_XlateResult := httpuritype (v_XlateUrl).getclob ();
-- dbms_output.put_line (v_XlateResult);
l_result := TRIM (BOTH '"' FROM REGEXP_SUBSTR (v_XlateResult, '"[^"]+"'));
RETURN l_result;
END;
/* Formatted on 07-09-2012 09:21:05 (QP5 v5.215.12089.38647) */
CREATE OR REPLACE PROCEDURE TEST.PRC_TRANS_GERMAN (TO_LANG1 IN VARCHAR2,
FROM_LANG1 IN VARCHAR2)
IS
P_CHINESE VARCHAR2 (3000);
FROM_LANG VARCHAR2 (3000);
FROM_LANG_CODE VARCHAR2 (3000);
TO_LANG_CODE VARCHAR2 (3000);
FROM_LANG_CODE1 VARCHAR2 (3000);
TO_LANG_CODE1 VARCHAR2 (3000);
cnt NUMBER := 1;
counter NUMBER;
CURSOR C1
IS
SELECT RAW_VAL_TXT FROM T_TRANS_VAL;
VC1 C1%ROWTYPE;
BEGIN
OPEN C1;
LOOP
FETCH C1 INTO VC1;
EXIT WHEN C1%NOTFOUND;
BEGIN
TO_LANG_CODE :=
CASE TO_LANG1
WHEN 'English' THEN 'en'
WHEN 'Chinese Simplified' THEN 'zh-CN'
WHEN 'Chinese Tradational' THEN 'zh-TW'
WHEN 'German' THEN 'de'
WHEN 'Japanese' THEN 'ja'
--other languages
END;
FROM_LANG_CODE :=
CASE FROM_LANG1
WHEN 'English' THEN 'en'
WHEN 'Chinese Simplified' THEN 'zh-CN'
WHEN 'Chinese Tradational' THEN 'zh-TW'
WHEN 'German' THEN 'de'
WHEN 'Japanese' THEN 'ja'
other languages
-- else 'auto'
END;
SELECT trans_jef (VC1.RAW_VAL_TXT, FROM_LANG_CODE, TO_LANG_CODE)
INTO P_CHINESE
FROM DUAL;
-- same translator function is used. Language used is simplied chinese.
-- We can use traditional Chinese as well ('zh-TW'), which works perfectly.
FROM_LANG_CODE1 := --decode(from_lang,'en','English','ar','Arabic', from_lang);
CASE FROM_LANG_CODE
WHEN 'en' THEN 'English'
WHEN 'zh-CN' THEN 'Chinese Simplified'
WHEN 'zh-TW' THEN 'Chinese Tradational'
WHEN 'de' THEN 'German'
WHEN 'ja' THEN 'Japanese'
--other languages
END;
TO_LANG_CODE1 := --decode(from_lang,'en','English','ar','Arabic', from_lang);
CASE TO_LANG_CODE
WHEN 'en' THEN 'English'
WHEN 'zh-CN' THEN 'Chinese Simplified'
WHEN 'zh-TW' THEN 'Chinese Tradational'
WHEN 'de' THEN 'German'
WHEN 'ja' THEN 'Japanese'
-- other languages
END;
INSERT INTO t_trans
VALUES (FROM_LANG_CODE1,
VC1.RAW_VAL_TXT,
TO_LANG_CODE1,
P_CHINESE);
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
INSERT INTO excep_trans (P_WORD_EXP, UPDATE_TIME, COUNTER)
VALUES (VC1.RAW_VAL_TXT, SYSDATE, cnt);
INSERT INTO error_message
VALUES (DBMS_UTILITY.FORMAT_ERROR_STACK);
COMMIT;
END;
END LOOP;
CLOSE C1;
END;
/Edited by: 950814 on 6 Sep, 2012 11:16 PM
Simply add the call to your exception hander. E.g.
EXCEPTION
WHEN OTHERS
THEN
UTL_TCP.Close_All_Connections;
INSERT INTO excep_trans (P_WORD_EXP, UPDATE_TIME, COUNTER)
VALUES (VC1.RAW_VAL_TXT, SYSDATE, cnt);
..etc..
END;Also consider using proper coding standards. There is NO modern day programming language standard that says to write (selective) reserved words in uppercase. Write in lowercase. Use camelcase and pascalcase for variable names and procedures/functions/methods. Restrict the use of uppercase to defining identifiers such as compiler macros or constants.
Do yourself a favour and read, understand and apply the basic naming standards as detailed in .Net Guidelines for Names and Code Conventions for the Java Programming Language.
Similar Messages
-
hi
I am getting the following error while calling the procedure in the batch process
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-29270: too many open HTTP requests
Could you please help me on this? As this is getting affected in the live databases.
ORA-06512: at "SYS.UTL_HTTP", line 1022
ORA-29270: too many open HTTP requests
CREATE OR REPLACE PROCEDURE Send_To_Spg(
PTRANSACTION_ID IN VARCHAR2,
PCHANNEL_TYPE IN VARCHAR2 DEFAULT NULL,
PCSS_ORDER_NUMBER IN VARCHAR2 DEFAULT NULL,
PTELEPHONE_NUMBER IN VARCHAR2 DEFAULT NULL,
PSCENARIO_TYPE IN VARCHAR2 DEFAULT NULL,
PCUSTOMER_REQUIRED_DATE IN VARCHAR2 DEFAULT NULL,
PCUSTOMER_REQUIRED_TIME IN VARCHAR2 DEFAULT NULL,
PCANCELLATION_REASON IN VARCHAR2 DEFAULT NULL,
PCANCELLATION_NOTES IN VARCHAR2 DEFAULT NULL,
PSMPF_RETENTION IN VARCHAR2 DEFAULT NULL,
PEMERGENCY_WINBACK IN VARCHAR2 DEFAULT NULL,
PCSS_PROJECT_ID IN VARCHAR2 DEFAULT NULL,
PCSS_ORDER_NOTES IN VARCHAR2 DEFAULT NULL,
PREASON_FOR_CESSATION IN VARCHAR2 DEFAULT NULL,
P_RESPONSE OUT VARCHAR2,
PSMART_USER_ID IN VARCHAR2 DEFAULT NULL,
PORACLE_ERROR OUT VARCHAR2,
PORACLE_ERROR_MESSAGE OUT VARCHAR2,
PRESPONSE_TIME OUT NUMBER,
PDATA_TRANSFER_STATUS OUT VARCHAR2)
IS
v_scenario_type VARCHAR2(20); -- Varialble to Hold Time Out of every request to SPG
v_transaction_time NUMBER; -- Total time in which Request to SPG was processed
v_record_inserted_at DATE; -- Date/Time about the record insertion to the Error Handler
v_start_time NUMBER; -- Variable to hold Start Time for calculationg Transaction Time
v_url VARCHAR2(32767);-- URL to use when sending data to SPG
vtransaction_id VARCHAR2(18); -- Variable to hold Transaction ID for the request
v_buffer VARCHAR2(32760);-- Variable to read response from the SPG interface
v_timeout PLS_INTEGER; -- Time Out for each Transaction
v_oracle_err_msg VARCHAR2(600); -- Variable to hold Oracle Error Message
v_resp UTL_HTTP.RESP; -- Response Object
v_req UTL_HTTP.REQ; -- Request Object
v_userid_pwd SMT_ORACLE_PARAMETERS%ROWTYPE; --Variable declared to contain User ID & Password
vl_RetCode VARCHAR2(5000);
vl_std_returnCode VARCHAR2(3000);
--PDATA_TRANSFER_STATUS Holds the Data Transfer Status which can have possible values as
-- N => Data Has not been sent to SPG
-- Y => Received Successful response from SPG
-- F => On the First try to Send data to SPG Oracle Error Occured or response from SPG was a faulure
-- S => On the Second try to Send data to SPG Oracle Error Occured or response from SPG was a faulure
-- T => Data Has been transferred to the Error Log Table
-- X => Data need not be transfered to Error Log Table.
--Location of the timeout, URL & User Id & Password in Standing Data.
c_url_stopwlr SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_WLR';-- Stop WLR URL
c_url_cancelown SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_OWN';-- Cancel own URL
c_url_cancelother SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_OTH';-- Cancel other URL
c_url_amendcrd SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPG_CRD';--Amend CRD URL
c_spg_useridpwd SMT_ORACLE_PARAMETERS.PARAMETER_CODE%TYPE:='SPGIDPWD'; --Contains user id and pwd
ctimeout smt_parameters.parameter_code%TYPE:='SPGTO'; --This holds the timeout parameter
BEGIN
--In case the calling batch process can pass this value this SQL read will not be required & can be deleted
--Read data transfer status for the transaction Id
SELECT data_transfer_status INTO PDATA_TRANSFER_STATUS FROM SPG_INTERFACE_TABLE
WHERE transaction_id = PTRANSACTION_ID;
--Record the start time
v_start_time:=DBMS_UTILITY.GET_TIME;
--If Data transfer status is S then send the record to error handler
IF PDATA_TRANSFER_STATUS = 'S' THEN
Error_Handler(PTRANSACTION_ID,PSMART_USER_ID,PORACLE_ERROR,PORACLE_ERROR_MESSAGE,v_record_inserted_at,PDATA_TRANSFER_STATUS);
ELSE
--In case Data Tranfer Status is something other than S then send the request to SPG
--Initialise other variables which will be populated during the journey
P_RESPONSE := '';
PORACLE_ERROR := NULL;
PORACLE_ERROR_MESSAGE := NULL;
PRESPONSE_TIME := 0;
--Read timeout parameter from standing data.
BEGIN
SELECT VALUE INTO v_timeout FROM smt_parameters WHERE parameter_code=ctimeout;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_timeout:=30;
WHEN OTHERS THEN
v_timeout:=30;
END;
-- Construct the URL for Stop WLR Scenario
IF PSCENARIO_TYPE = 'STOP_WLR' THEN
BEGIN
-- Read the Initial URL from Standing Data
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_stopwlr
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url:='Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_winback_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url:='Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_winback_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL depending on the parameters to be passed to the url
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' || Smart_Urlencode('xmloverhttp') || '&';
v_url := v_url || 'p_channel_type=' || Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' || Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' || Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_crd=' || Smart_Urlencode(PCUSTOMER_REQUIRED_DATE)|| '&';
v_url := v_url || 'p_take_over_time=' || Smart_Urlencode(PCUSTOMER_REQUIRED_TIME)|| '&';
v_url := v_url || 'p_retainsmpf=' || Smart_Urlencode(PSMPF_RETENTION)|| '&';
--v_url := v_url || 'p_emergency_winback=' || Smart_Urlencode(PEMERGENCY_WINBACK)|| '&';
v_url := v_url || 'p_projectno=' || Smart_Urlencode(PCSS_PROJECT_ID)|| '&';
v_url := v_url || 'p_ordernotes=' || Smart_Urlencode(PCSS_ORDER_NOTES)|| '&';
v_url := v_url || 'p_reason_cessation=' || Smart_Urlencode(PREASON_FOR_CESSATION);
ELSIF PSCENARIO_TYPE='CANCEL_OWN' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_cancelown
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelown_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelown_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_cancel_reason=' ||Smart_Urlencode(PCANCELLATION_REASON)|| '&';
v_url:= v_url || 'p_cancel_notes=' ||Smart_Urlencode(PCANCELLATION_NOTES);
ELSIF PSCENARIO_TYPE='CANCEL_OTHER' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_cancelother
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelother_details'; --After testing the same, URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_cancelother_details'; --After testing the same, URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_stop_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_cancel_reason=' ||Smart_Urlencode(PCANCELLATION_REASON);
ELSIF Pscenario_type='AMEND_CRD' THEN
--Fetch the URL for cancel own from standing data.
BEGIN
SELECT VALUE
INTO v_url
FROM SMT_ORACLE_PARAMETERS
WHERE parameter_code = c_url_amendcrd
AND host_id = ( SELECT host_id
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS b
WHERE A.hostname = b.hostname
AND A.database_id = b.database_id));
--handle unforseen exception
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_amendcrd_details'; -- After testing the same , URL will be fetched from the Query
WHEN OTHERS THEN
v_url := 'Http://wls.brassi1c.devenv1.bt.co.uk:64738/pls/spgenv/spg_btrc.add_btrc_amendcrd_details'; -- After testing the same , URL will be fetched from the Query
END;
--construct the URL
v_url := v_url || '?';
v_url := v_url || 'p_data_entered=' ||Smart_Urlencode('xmloverhttp')|| '&';
v_url := v_url || 'p_channel_type=' ||Smart_Urlencode(PCHANNEL_TYPE)|| '&';
v_url := v_url || 'p_css_start_order_no=' ||Smart_Urlencode(PCSS_ORDER_NUMBER)|| '&';
v_url := v_url || 'p_tel_no=' ||Smart_Urlencode(PTELEPHONE_NUMBER)|| '&';
v_url := v_url || 'p_crd=' ||Smart_Urlencode(PCUSTOMER_REQUIRED_DATE)|| '&';
v_url := v_url || 'p_css_change_order_numbers='||Smart_Urlencode(PCANCELLATION_REASON);
END IF;
--this is start of setting parameters for utl http object. the show begins...
utl_http.set_transfer_timeout(v_timeout);
--Set the wallet
--XXXXX e.g.UTL_HTTP.SET_WALLET(?file:DirectoryPath?,'put password here?);
--Set proxy
--YYYYY e.g. utl_http.set_proxy(p_proxy_in, p_no_proxy_domains_in);
v_url := REPLACE(v_url,'%27%27','%27'); -- Fix to ensure Double Quotes are converted to Single Quotes
--set the required URL to utl http.
v_req := utl_http.begin_request(v_url);
--Authentication setting
--Fetch the user id and password from stnding data.
BEGIN
SELECT *
INTO v_userid_pwd
FROM SMT_ORACLE_PARAMETERS
WHERE PARAMETER_CODE=c_spg_useridpwd
AND HOST_ID = ( SELECT HOST_ID
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS B
WHERE A.HOSTNAME = B.HOSTNAME
AND A.DATABASE_ID = B.DATABASE_ID));
EXCEPTION
WHEN NO_DATA_FOUND THEN
P_RESPONSE := 'ORACLE_ERROR: USER id AND Password NOT configured IN SMT_ORACLE_PARAMETERS:SPGIDPWD';
WHEN OTHERS THEN
P_RESPONSE := 'ORACLE_ERROR: USER id AND Password NOT configured IN SMT_ORACLE_PARAMETERS:SPGIDPWD';
END;
--utl_http.set_authentication(v_req, p_username_in, p_password_in);
utl_http.set_authentication(v_req, v_userid_pwd.description, v_userid_pwd.VALUE);
v_resp := utl_http.get_response(v_req);
--Fill in the the response time
PRESPONSE_TIME := (DBMS_UTILITY.GET_TIME - v_start_time)/100;
IF v_resp.reason_phrase = 'OK' THEN
-- Fetch the response
BEGIN
LOOP
utl_http.read_line(v_resp, v_buffer);
P_RESPONSE := P_RESPONSE || v_buffer;
END LOOP;
utl_http.end_response(v_resp);
EXCEPTION
WHEN utl_http.end_of_body THEN
utl_http.end_response(v_resp);
P_RESPONSE := P_RESPONSE || v_buffer;
END;
ELSIF v_resp.reason_phrase <> 'OK' OR P_RESPONSE = '' THEN
--error handling starts
--If the HTTP Status is not OK then store the error information
PORACLE_ERROR_MESSAGE := 'Status Code: '|| v_resp.STATUS_CODE||'. Reason Phrase ' ||v_resp.reason_phrase;
P_RESPONSE := 'ORACLE_ERROR: '|| ' Reason Phrase ' || v_resp.reason_phrase;
PORACLE_ERROR := v_resp.STATUS_CODE;
END IF;
--In case we got successful response from SPG
IF P_RESPONSE LIKE '%<RetCde>0</RetCde>%' THEN
PDATA_TRANSFER_STATUS := 'Y';
ELSE
BEGIN
SELECT message
INTO vl_std_returnCode
FROM SMT_MESSAGES
WHERE MESSAGE_CODE='SPGANTIDTS';
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '-12545,-29273,-1,401,';
WHEN OTHERS THEN
vl_std_returnCode := '-12545,-29273,-1,401,';
END;
--In case there was an error do not update Data Transfer Status
IF PORACLE_ERROR <> NULL AND INSTR(vl_std_returnCode, PORACLE_ERROR || ',', 1, 1) <> 0 THEN
PDATA_TRANSFER_STATUS:=PDATA_TRANSFER_STATUS;
ELSE
vl_RetCode := SUBSTR(P_RESPONSE, INSTR(P_RESPONSE,'<RetCde>', 1, 1),
INSTR(P_RESPONSE,'</RetCde>',1,1)+9 - INSTR(P_RESPONSE,'<RetCde>', 1, 1));
BEGIN
SELECT VALUE
INTO vl_std_returnCode
FROM SMT_ORACLE_PARAMETERS
WHERE PARAMETER_CODE='SPGRCS'
AND HOST_ID = ( SELECT HOST_ID
FROM SMART_HOSTS A
WHERE EXISTS ( SELECT 1
FROM DB_PARAMETERS B
WHERE A.HOSTNAME = B.HOSTNAME
AND A.DATABASE_ID = B.DATABASE_ID));
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '<RetCde>4244</RetCde><RetCde>4245</RetCde><RetCde>4246</RetCde>';
WHEN OTHERS THEN
vl_std_returnCode := '<RetCde>4244</RetCde><RetCde>4245</RetCde><RetCde>4246</RetCde>';
END;
IF INSTR(vl_std_returnCode, vl_RetCode, 1, 1) <> 0 THEN
--needs not to re attempted.
PDATA_TRANSFER_STATUS:='X';
ELSE
--In case we did'nt got SUCCESSFUL response FROM SPG THEN UPDATE the Data Transfer Status so that the failed requests can be picked up BY the NEXT batch job RUN
IF PDATA_TRANSFER_STATUS='N' THEN
--initially if data transfer status was N then update it now to F
PDATA_TRANSFER_STATUS := 'F';
ELSIF PDATA_TRANSFER_STATUS='F' THEN
--initially if data transfer status was N then update it now to S
PDATA_TRANSFER_STATUS := 'S';
END IF;
END IF;
END IF;
END IF;
--Now Update all the modified Values
UPDATE SPG_INTERFACE_TABLE
SET response = P_RESPONSE,
data_transfer_status = PDATA_TRANSFER_STATUS,
oracle_error = PORACLE_ERROR,
oracle_error_message = PORACLE_ERROR_MESSAGE,
response_time = PRESPONSE_TIME
WHERE transaction_id = PTRANSACTION_ID;
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS THEN
--Handling the unhandled exception
PORACLE_ERROR := SQLCODE;
PORACLE_ERROR_MESSAGE := SQLERRM;
P_RESPONSE := 'ORACLE_ERROR: '|| PORACLE_ERROR_MESSAGE;
PRESPONSE_TIME := (DBMS_UTILITY.GET_TIME - v_start_time)/100;
SELECT data_transfer_status INTO PDATA_TRANSFER_STATUS
FROM SPG_INTERFACE_TABLE
WHERE transaction_id=PTRANSACTION_ID;
--New functionality to update the oracle error and oracle error message and not the Data Transfer Status
BEGIN
SELECT message
INTO vl_std_returnCode
FROM SMT_MESSAGES
WHERE MESSAGE_CODE='SPGANTIDTS';
EXCEPTION
WHEN NO_DATA_FOUND THEN
vl_std_returnCode := '-12545,-29273,-1,';
WHEN OTHERS THEN
vl_std_returnCode := '-12545,-29273,-1,';
END;
vl_RetCode := PORACLE_ERROR || ',';
IF INSTR(vl_std_returnCode, vl_RetCode, 1, 1) <> 0 THEN
--If the error is found in above maintained standing data do not change the Data Transfer Status
pdata_transfer_status:=pdata_transfer_status;
ELSE
IF pdata_transfer_status='N' THEN
PDATA_TRANSFER_STATUS := 'F';
DBMS_OUTPUT.PUT_LINE('DUE TO ERROR DATA COULDN''T GET TRANSFERED TO SPG FOR TRANSACTION'||' '||PTRANSACTION_ID);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ELSIF pdata_transfer_status='F' THEN
PDATA_TRANSFER_STATUS := 'S';
DBMS_OUTPUT.PUT_LINE('DUE TO ERROR DATA COULDN''T GET TRANSFERED TO SPG FOR TRANSACTION'||' '||PTRANSACTION_ID);
DBMS_OUTPUT.PUT_LINE(SQLERRM);
ELSE
DBMS_OUTPUT.PUT_LINE('Failure WHEN sending data TO Error LOG. Data Transfer Status IS ' || PDATA_TRANSFER_STATUS || '. TRANSACTION ID '|| PTRANSACTION_ID);
END IF;
END IF;
--Now update all the information gathered above to the table
UPDATE SPG_INTERFACE_TABLE
SET response = P_RESPONSE,
data_transfer_status = PDATA_TRANSFER_STATUS,
oracle_error = PORACLE_ERROR,
oracle_error_message = PORACLE_ERROR_MESSAGE,
response_time = PRESPONSE_TIME
WHERE transaction_id = PTRANSACTION_ID;
COMMIT;
END;
/I have fixed the problem by own.
Seems there are some while space in the endpoint url.
Fix
http_req:= utl_http.begin_request
trim(l_endpoint_url)
,'POST'
,'HTTP/1.1'
It works...
Regards
BS -
UTL_MAIL --- ORA-30678: too many open connections
Hello,
I have a pl/sql package that sends out emails using UTL_MAIL pkg pointing to an Exchange server, an APEX app calls this pkg.. This package used to work fine for months but I recently noticed that some emails are not being sent as expected. The package loops through a set of action items satisfying some conditions and send emails based on that ( this number is expected to grow every day ). I checked the errors log and I found this error:
ORA-30678: too many open connections
I think this means that I have to close the connection everytime I send en email, but UTL_MAIL does NOT have a function or a proc to close connections, right ?
I don't know what causes this error to happen, but I suspect that this started happening right after we re-pointed the UTL_MAIL pkg from a Lotus Notes server to an Exchange server.
I am also seeing this error:
ORA-29279: SMTP permanent error: 501 5.1.3 Invalid address
I know where this error comes from (usually a null email id in the FROM or TO field ), but can this be causing the first error to happen ?
Please advise if you got this error before, is it a bug in oracle 10g as I read in some blog ? or is the second error happening make the Exchange server refuse SMTP connections ???
Thanks,
SamHi Sam,
seems to be a bug in UTL_MAIL if you ask me, as you are right - there is only /send/, no option to close, so I'd expect this to be done automatically.
Anyway, though UTL_MAIL is usable for basic mailing, I prefer using a custom mail implementation based on UTL_SMTP. The most important reason is that most mail servers don't work without authentication. And if you have done this once, you can reuse the function/procedure/package as simple as UTL_MAIL. The good news is, that there are several examples published that provide you with the functionality you have in UTL_MAIL at once - with the difference, that you definetly get your connection closed when you expect it to be closed.
You'll also be able to handle empty addresses. Perhaps this error actually causes UTL_MAIL to "forget" to close the connection, if this exception isn't caught before in order to close an open connection before raising it to the outside.
One example implementation for using UTL_SMTP can be found [url http://www.morganslibrary.com/reference/pkgs/utl_smtp.html]here
-Udo -
ORA-30678: too many open connections
Hi,
I executed this procedure..
CREATE OR REPLACE procedure
TRY.e_mail_message
from_name in varchar2,
to_name in varchar2,
subject in varchar2,
message in varchar2
is
l_mailhost VARCHAR2(64);
l_from VARCHAR2(64);
l_to VARCHAR2(64);
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
l_mail_conn UTL_SMTP.connection;
mesg VARCHAR2( 4000 );
BEGIN
select a.SERVER into l_mailhost from email_setting a where a.SERVER is not null;
select a.USERNAME into l_from from email_setting a where a.SERVER is not null;
l_from := from_name;
--UTL_SMTP.open_data(l_mail_conn);
dbms_output.put_line('email test ');
mesg:= 'Date: ' || TO_CHAR( SYSDATE, 'dd Mon yy hh24:mi:ss' ) || crlf ||
'From: <'||l_from||'>' || crlf ||
'Subject: ' ||subject|| crlf ||
'To: '||to_name || crlf || '' || crlf ;
mesg:=mesg||message;
dbms_output.put_line(mesg);
l_mail_conn := UTL_SMTP.open_connection(l_mailhost, 25);
UTL_SMTP.helo(l_mail_conn, l_mailhost);
UTL_SMTP.mail(l_mail_conn, l_from);
UTL_SMTP.rcpt(l_mail_conn, to_name);
UTL_SMTP.data(l_mail_conn, mesg);
UTL_SMTP.quit(l_mail_conn);
exception
when others then dbms_output.put_line(sqlerrm);
END;
However, email could not be sent to recipient. Below is the error message.
Sending email to subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
call email_mssg cmd 3
email test
Date: 23 June 10 15:11:50
From: <>
Subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
To: [email protected]
Please Settle Outstanding Bil for your Invoice No: CA/01062010/555. Thank you
ORA-30678: too many open connections
Below is the username I keyed in the email_setting table, with reference to the select username statement from the procedure as above.
username in email_setting => [email protected]
I also tried key in as '[email protected]' but still not working.
Could someone suggest any solution? Thanks..Mr. Saubhik,
Yes, no data passed for the From: as shown from the dbms output error message shown below:
Sending email to subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
call email_mssg cmd 3
email test
Date: 23 June 10 16:15:04
From:
Subject: Reminder to settle outstanding bil for Invoice No: CA/01062010/555
To: [email protected]
Please Settle Outstanding Bil for your Invoice No: CA/01062010/555. Thank you
ORA-29279: SMTP permanent error: 501 5.1.7 Invalid address
I am clueless how to settle this. I don't want to hard code the sender's email address. Please help. Thank you. -
ORA-30678: too many open connections with UTL_MAIL.send
I'm have just recently started getting the ORA-30678: too many open connections error while calling the UTL_MAIL.send procedure to send emails via a pl/sql package. The call is made within a loop and there can be a significant number of calls made to this procedure. In fact, I received this error over 1400 times within the last three days. This was previously working until I made a change to the processing which now results in a larger number of emails/calls to this procedure. I don't see any documentation on how (or if) I can close the connection with UTL_MAIL.
I'm using Oracle 11g. Any insight would be much appreciated.
Thanks,
TeriLooks like a bug possibly, check out this MOS Note:
Ora-30678: Too Many Open Connections From UTL_MAIL [ID 788442.1]
The bug note says it was fixed in 11.2. Not sure which version of 11 you are running.
Edited by: Centinul on Apr 26, 2010 2:07 PM -
Scorm-based test causes too many Blackboard http requests
We are looking into a problem with scorm-based tests and learning modules created in Adobe Captivate. Viewing the scorm content in our Blackboard LMS generates ridiculous amounts of network traffic. A simple click in the scorm module triggers anything between 10 and 100+ http-requests, even if no interaction with the server is required. The same click sometimes results in 5 requests, other times in 50 requests or more.It's always a sequence of the same two requests, see below (only the max value in "Keep-Alive: timeout=10, max=98" counts down).
If these scorm modules are taken by a group of students, the enormous amount of http requests put a lot of pressure on our Blackboard system, which results in a slow behaviour of the modules. Has anyone seen this behaviour and does anyone know of a way to prevent it?
(below, part of the http headers collected with the Firefox Live HTTP Headers Add-on)
https://...cc.kuleuven.be/courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_sup port.swf?invokeMethod=methodToExecute&lc_name=lc_name¶m=tempVar|true
GET /courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invokeMethod=me thodToExecute&lc_name=lc_name¶m=tempVar|true HTTP/1.1
Host: ...cc.kuleuven.be
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://...cc.kuleuven.be/courses/1/a-C112956-K/content/_7409447_1/ABT%20Excel%20Toets4.ht m
Cookie: JSESSIONID=2FFDF51EB1DFD4B73B539C63607A9177.root; __utma=137656618.1128290341.1286972380....
If-Modified-Since: Mon, 06 Dec 2010 17:40:03 GMT
If-None-Match: W/"149-1291657203000"
HTTP/1.1 304 Not Modified
Date: Fri, 10 Dec 2010 09:00:13 GMT
Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8i mod_jk/1.2.27
X-Blackboard-appserver: ...cc.kuleuven.be
X-Blackboard-product: Blackboard Learn™ 9.0.505.0
Set-Cookie: session_id=80EA2381B7970776B9C3202ADBDEC94E; Path=/
Set-Cookie: s_session_id=FB7D2433E54EFA941E49E6C79B536CDA; Path=/; Secure
Etag: W/"149-1291657203000"
Content-Length: 0
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=iso-8859-1
https://../courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invoke Method=methodToExecute&lc_name=lc_name¶m=tempVar|true
GET /courses/1/a-C112956-K/content/_7409447_1/SCORM_support/scorm_support.swf?invokeMethod=me thodToExecute&lc_name=lc_name¶m=tempVar|trueHTTP/1.1
Host: ...kuleuven.be
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: https://../courses/1/a-C112956-K/content/_7409447_1/ABT%20Excel%20Toets4.htm
Cookie: JSESSIONID=2FFDF51EB1DFD4B73B539C63607A9177.root; __utma=137656618.1128290341.1286972380...
If-Modified-Since: Mon, 06 Dec 2010 17:40:03 GMT
If-None-Match: W/"149-1291657203000"
HTTP/1.1 304 Not Modified
Date: Fri, 10 Dec 2010 09:00:13 GMT
Server: Apache/1.3.41 (Unix) mod_ssl/2.8.31 OpenSSL/0.9.8i mod_jk/1.2.27
X-Blackboard-appserver: ...cc.kuleuven.be
X-Blackboard-product: Blackboard Learn™ 9.0.505.0
Set-Cookie: session_id=80EA2381B7970776B9C3202ADBDEC94E; Path=/
Set-Cookie: s_session_id=FB7D2433E54EFA941E49E6C79B536CDA; Path=/; Secure
Etag: W/"149-1291657203000"
Content-Length: 0
Keep-Alive: timeout=10, max=98
Connection: Keep-Alive
Content-Type: text/plain; charset=iso-8859-1Simply add the call to your exception hander. E.g.
EXCEPTION
WHEN OTHERS
THEN
UTL_TCP.Close_All_Connections;
INSERT INTO excep_trans (P_WORD_EXP, UPDATE_TIME, COUNTER)
VALUES (VC1.RAW_VAL_TXT, SYSDATE, cnt);
..etc..
END;Also consider using proper coding standards. There is NO modern day programming language standard that says to write (selective) reserved words in uppercase. Write in lowercase. Use camelcase and pascalcase for variable names and procedures/functions/methods. Restrict the use of uppercase to defining identifiers such as compiler macros or constants.
Do yourself a favour and read, understand and apply the basic naming standards as detailed in .Net Guidelines for Names and Code Conventions for the Java Programming Language. -
ORA-01000: Too many open cursors -- Need Help
Hi All,
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
PL/SQL Release 11.1.0.7.0 - Production
I am getting error ora-01000 for the following procedures gather stats
Could you please guide how to get-rid-off this error.
thanks in advance;
CREATE OR REPLACE PROCEDURE SHEMA_NAME ANALYZE_TABLES IS
rec_table_name VARCHAR2 (30);
CURSOR c1
IS
SELECT table_name
FROM USER_tables; ------ 18000 table for this cursor
BEGIN
OPEN c1;
LOOP
FETCH c1 INTO rec_table_name;
EXIT WHEN c1%NOTFOUND;
-- block was hereÿÿÿ
BEGIN
DBMS_STATS.
GATHER_TABLE_STATS (
OWNNAME => 'SHEMA_NAME',
TABNAME => rec_table_name,
PARTNAME => NULL,
ESTIMATE_PERCENT => 30,
METHOD_OPT => 'FOR ALL COLUMNS SIZE AUTO',
DEGREE => 5,
CASCADE => TRUE);
END;
END LOOP;
CLOSE c1;
EXCEPTION
WHEN OTHERS
THEN
raise_application_error (
-20001,
'An error was encountered - ' || SQLCODE || ' -ERROR- ' || SQLERRM);
END;Look at the following:
SQL> begin
2 raise no_data_found;
3 end;
4 /
begin
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 2
The error code the caller executing this code receive is -01403. A unique error number that has a known and specific meaning.
In addition, the error stack tells the caller that this unique error occurred on line 2 in the source code.
The caller knows EXACTLY what the error is and where it occurred.
SQL> begin
2 raise no_data_found;
3 exception when OTHERS then
4 raise_application_error(
5 -20000,
6 'oh damn some error happened. the error is '||SQLERRM
7 );
8 end;
9 /
begin
ERROR at line 1:
ORA-20000: oh damn some error happened. the error is ORA-01403: no data found
ORA-06512: at line 4
In this case the caller gets the error code -20000. It is meaningless as the same error code will be use for ALL errors (when OTHERS). So the caller will never know what the actual real error is.
For the caller to try and figure that out, it will need to parse and process the error message text to look for the real error code. A very silly thing to do.
In addition, the error stack says that the error was caused by line 4 in the code called.. except that this is the line that raised the meaningless generic error and not the actual line causing the error.
There are 3 basic reasons for writing an exception handler:
- the exception is not an error
- the exception is a system exception (e.g. no data found) and needs to be turned into meaningful application exceptions (e.g. invoice not found, customer not found, zip code not found, etc)
- the exception handler is used as a try..finally resource protection block (which means it re-raises the exception)
If your exception handler cannot tick one of these three reasons for existing, you need to ask yourself why you are writing that handler. -
Operation Could Not Be Completed: Too Many Open...
I've had this error showing up a lot in the Safari 3.2 and 4.0 beta activity window when loading multiple tabs of pages with many images (usually gallery type pages or blogs with lots of thumbnails). The result is that some images or other elements like style sheets don't load, leading to the blue question mark, or messed up formatting. Unfortunately, the activity window can't be stretched wide enough to see the whole error, but in fact it's "Operation Could Not Be Completed: Too Many Open Files". The error "socket(PF_ROUTE) failed: Too many open files" shows up in the Console as well, at least with Safari 4. I had also experienced similar problems with "Operation Timed Out" errors as well.
I've been pulling my hair out on this one, because it's rather inconsistent, not to mention annoying. You can usually get an individual page to load completely by refreshing it, but that kind of defeats the purpose of loading multiple tabs all at once. It's also less of a problem if more of those pages are already cached, but you never know for sure. Running your connection through a proxy also helps a bit, but not always.
I found a fix, but it's actually not Safari's "fault" per se. The issue lies in the allowable number of open files per user process, which is set by the system's launchd process at boot time. Note that Safari is not entirely innocent, as FireFox doesn't have this problem. It Seems that Safari just tries to load everything all at once, whereas FireFox does a better job of managing its load requests. Anyway if you run the following command in Terminal:
sudo launchctl limit
the following list should show up (with perhaps slightly different values)
cpu unlimited unlimited
filesize unlimited unlimited
data 6291456 unlimited
stack 8388608 67104768
core 0 unlimited
rss unlimited unlimited
memlock unlimited unlimited
maxproc 200 532
maxfiles 256 unlimited
The second column is a "soft limit" and the third column is a "hard limit", though to be honest I'm not exactly sure what the difference entails. The image loading problem is caused by hitting the maxfiles limit of just 256 files. The solution is to change maxfiles to 4096/unlimited, and also change maxproc to 1000/2000 since it's pretty low as well. That sounds like a pretty big change, but OS X server is supposed to change them to numbers like this when services like Apache are enabled, and Apple even mentions how to change maxproc at http://support.apple.com/kb/TS1659
To make these changes, run the following two commands in Terminal and restart the computer:
echo "limit maxproc 1000 2000" | sudo tee -a /etc/launchd.conf
echo "limit maxfiles 4096 unlimited" | sudo tee -a /etc/launchd.conf
The commands add the two lines in quotes to the launchd.conf file in /etc/ (if no file exists yet, it creates it). That should clear up the loading issues. I haven't noticed any other problems with these increased numbers, but I'll report back if anything seems to go amiss. Hopefully this will be helpful to someone.I faced the same problem with an image gallery using css for image resizing. Thanks for the explanation.
-
Hello!
On MacOSX 10.4.10 which is an OD master, my log are filed with this:
DirectoryService[67]: socket(PF_ROUTE) failed: Too many open files
It happens at exactly every hours 44 minutes 18 seconds 161 times. At the same time, it makes a lot dns request for "kerberos-master.udp.XXXXXXXXX.COM IN SRV +"
The server works fine, but there's probably a cronjob that go crazy and i would like to know why it's happening.
Thanks a lot!
FredHi,
Cause might The server got an exception while trying to accept client connections. It will try to backoff to aid recovery.
The OS limit for the number of open file descriptor (FD limit) needs to be increased. Tune OS parameters that might help the server to accept more client connections (e.g. TCP accept back log).
http://e-docs.bea.com/wls/docs90/messages/Server.html#BEA-002616
Regards,
Prasanna Yalam -
STARTING DATABASE : PROBLEM OF Linux Error: 23: Too many open files in syst
Hi everybody,
I am running an RMAN script and get this error,
9> @/u01/app/oracle/admin/devpose/backup/configuration.rcv
RMAN> ###################################################################
2> # Configuration file used to set Rman policies.
3> #
4> ###################################################################
5>
6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
RMAN> #CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
2> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
RMAN>
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u01/app/oracle/backup/db/ora_df%t_s%s_s%p';
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 08/26/2009 20:03:30
RMAN-06403: could not obtain a fully authorized session
ORA-01034: ORACLE not available
But this problem is understandable, as the database is not running. The main problem why database is not running, I have found the reason but do not understand how to solve the problem.
Since, the database was not running, I tried to startup the database, I then came across the following which is my problem (Why so many files are open? Linux OS error says too many files open. See below,
SQL> conn /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 419430400 bytes
Fixed Size 779516 bytes
Variable Size 258743044 bytes
Database Buffers 159383552 bytes
Redo Buffers 524288 bytes
Database mounted.
ORA-00313: open failed for members of log group 2 of thread 1
ORA-00312: online log 2 thread 1: '/u01/app/oracle/oradata/devpose/redo02.log'
ORA-27041: unable to open file
Linux Error: 23: Too many open files in system
Can anybody has run into such problem and guide me to a solution, please?
ThanksHi,
yes, this DB was functioning o.k. this configuration script was part of RMAN daily backup.
Last night the backup failed. So, when I opened "Failed job" in the EM, I saw this type of messages.
That was the starting point. Gradually, I tried to narrow down on to the actual problem and found the findings as I have posted.
One way of sovling problem, I thought that, all these processes I would kill and then try to open the database, it might startup. However, that wouldnot lead me in ensuring this won't occur again.
That's why I am trying to understand why it should open, so many processes (why spawn so many .flb files?) Any thoughts you have around this?
I will try to restart the OS as the last resort.
Thanks for your help and suggestions.
Regards, -
"Too many open files" Exception on "tapestry-framework-4.1.1.jar"
When a browser attempts accessing to my webwork, the server opens a certain number of file descriptors to "tapestry-framework-4.1.1.jar" file and don't release them for a while.
Below is the output from "lsof | grep tapestry":
java 26735 root mem REG 253,0 62415 2425040 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-portlet-4.1.1.jar
java 26735 root mem REG 253,0 2280602 2425039 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-framework-4.1.1.jar
java 26735 root mem REG 253,0 320546 2425036 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-contrib-4.1.1.jar
java 26735 root mem REG 253,0 49564 2424979 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-annotations-4.1.1.jar
java 26735 root 28r REG 253,0 2280602 2425039 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-framework-4.1.1.jar
java 26735 root 29r REG 253,0 2280602 2425039 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-framework-4.1.1.jar
java 26735 root 30r REG 253,0 2280602 2425039 /usr/local/apache-tomcat-5.5.20/my_webwork/WEB-INF/lib/tapestry-framework-4.1.1.jar
These unknown references are sometimes released automatically, but sometimes not.
And I get "Too many open files" exception after using my application for a few hours.
The number of the unknown references increases as I access to my webwork or just hit on "F5" key on my browser to reload it.
I tried different types of browsers to see if I could see any differences in consequence, and in fact it differed by the browser I used.
When viewed by Internet Explorer it increased by 3 for every access.
On the other hand it increased by 7 for each attempt when accessed by FireFox.
I have already tried optimizing the max number of file discriptors, and it solved the "Too many open files" exception.
But stil I'm wondering who actually is opening "tapestry-framework-4.1.1.jar" this many.
Could anyone figure out what is going on?
Thanks in advance.
The following is my environmental version info:
- Red Hat Enterprise Linux ES release 4 (Nahant Update 4)
- Java: 1.5.0_11
- Tomcat: 5.5.20
- Tapestry: 4.1.1Hi,
Cause might The server got an exception while trying to accept client connections. It will try to backoff to aid recovery.
The OS limit for the number of open file descriptor (FD limit) needs to be increased. Tune OS parameters that might help the server to accept more client connections (e.g. TCP accept back log).
http://e-docs.bea.com/wls/docs90/messages/Server.html#BEA-002616
Regards,
Prasanna Yalam -
ORA-02020 too many database links
Hello,
I'm getting the ORA-02020 too many database links error in my Apex application. This error occurs when I run an interactive report in a page. There are 21 pages and 7 database links in the application. Each page has one interactive report that references one database link in the region source.
The database links are referenced in each page as follows: database link1 (page 1); database link2 (pages 2 and 3); database link3 (pages 4-7), database link4 (pages 8-15); database link5 (pages 16-18); database link6 (pages 19); and database link7 (pages 20-21). Each database link is referenced to separate schemas in one remote Oracle database.
I tried to eliminate the error by setting the open_links and open_links_per_instance parameters in the init.ora file of the remote and XE databases to 100 then restarted the both databases. This solution did not work. I created separate Application Processes from the Shared Components to close each database link by implementing the following:
Click on Shared Components> Logic > Application Processes > Create >
Name: CLOSE_LINK1
Sequence: 1
Point: On Load: Before Header (page template header)
Type: PL/SQL Anonymous Block
Process Text: execute immediate 'ALTER SESSION CLOSE DATABASE LINK LINK1';
Error Message: Database Link Error
When I run the application now, the ORA-02081: database link is not open error appears.
Please help anyone! I know someone has experienced these same errors.
Thanks,
Ms. HJoel,
Thank you for your quick response. For clarification purposes, could you provide samples for 1) issuing the CLOSE DATABASE LINK and catching the exception; and 2) querying from V$DBLINK prior to issuing the CLOSE DATABASE LINK from the Shared Components > Logic > Application Processes?
Lets assume the following query with a database link in the region source is referenced for Page 1.
Page 1 - Employee Listing
Region Source:
select ename, job, hiredate
from scott.emp@link1
Lets assume the following Application Processes from the Shared Components is referenced to close the database link:
Click on Shared Components> Logic > Application Processes > Create >
Name: CLOSE_LINK1
Sequence: 1
Point: On Load: Before Header (page template header)
Type: PL/SQL Anonymous Block
Process Text: execute immediate 'ALTER SESSION CLOSE DATABASE LINK LINK1';
Error Message: Database Link Error
My thoughts are to do the following:
1. Log in SQL*Plus as SYS
SQL> grant select to v_$dblink to scott;
2. In Apex, goto Shared Components> Logic > Application Processes and add the following queries in the Process Text:
Name: CLOSE_LINK1
Sequence: 1
Process Text:
select db_link from v$dblink;
execute immediate 'ALTER SESSION CLOSE DATABASE LINK LINK1';
3. Catch the exception???
Your assistance is greatly appreciated. :8}
Ms. H -
Actually, the stuff works in interpreted mode.
It's only when having the server partition compiled that this happen.
j-p
-----Message d'origine-----
De: Adamek, Zenon [mailto:ZAdamekpurolator.com]
Date: lundi 25 septembre 2000 17:13
À: 'Jean-Paul.Gabriellisema.fr'
Cc: Forte-userslists.xpedior.com
Objet: RE: (forte-users) [UNIX] "Too many open files" 3.0.M2 question
see Technote 10981
-----Original Message-----
From: Jean-Paul Gabrielli [SMTP:Jean-Paul.Gabriellisema.fr]
Sent: Monday, September 25, 2000 11:02 AM
To: zeForte-users
Subject: (forte-users) [UNIX] "Too many open files" 3.0.M2 question
Hi,
running a server partition that reads a configuration file,
and apparently doen't close it after, I have that exception:
SYSTEM ERROR: System Error: Too many open files, opening '....'with mode
'r'
Class: qqos_FileResourceException
1) Is there such a limit, or does this rely only on the OS one ?
2) How is this error not trapped, as I only got itinteractively, whereas
my server log does a exception trap/segmentation fault,
thanlks
j-p
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe,send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comHi Jean-Paul,
As described in the Technote 10981 some Forte programs (Nodemanager and
router) handle correct the high-file descriptor-use problem. It is possible
that Forte interpreter do it correct too.
Zenon
-----Original Message-----
From: Jean-Paul Gabrielli [SMTP:Jean-Paul.Gabriellisema.fr]
Sent: Monday, September 25, 2000 12:11 PM
To: Adamek, Zenon
Cc: Forte-userslists.xpedior.com
Subject: RE: (forte-users) [UNIX] "Too many open files" 3.0.M2
question
Actually, the stuff works in interpreted mode.
It's only when having the server partition compiled that this happen.
j-p
-----Message d'origine-----
De: Adamek, Zenon [mailto:ZAdamekpurolator.com]
Date: lundi 25 septembre 2000 17:13
À: 'Jean-Paul.Gabriellisema.fr'
Cc: Forte-userslists.xpedior.com
Objet: RE: (forte-users) [UNIX] "Too many open files" 3.0.M2 question
see Technote 10981
-----Original Message-----
From: Jean-Paul Gabrielli [SMTP:Jean-Paul.Gabriellisema.fr]
Sent: Monday, September 25, 2000 11:02 AM
To: zeForte-users
Subject: (forte-users) [UNIX] "Too many open files" 3.0.M2 question
Hi,
running a server partition that reads a configuration file,
and apparently doen't close it after, I have that exception:
SYSTEM ERROR: System Error: Too many open files, opening '....'with mode
'r'
Class: qqos_FileResourceException
1) Is there such a limit, or does this rely only on the OS one ?
2) How is this error not trapped, as I only got itinteractively, whereas
my server log does a exception trap/segmentation fault,
thanlks
j-p
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe,send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.xpedior.com
>
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
Too many open files in system cause database goes down
Hello experts I am very worry because of the following problems. I really hope you can help me.
some server features
OS: Suse Linux Enterprise 10
RAM: 32 GB
CPU: intel QUAD-CORE
DB: There is 3 instances RAC databases (version 11.1.0.7) in the same host.
Problem: The database instances begin to report Error message: Linux-x86_64 Error: 23: Too many open files in system
and here you are other error messages:
ORA-27505: IPC error destroying a port
ORA-27300: OS system dependent operation:close failed with status: 9
ORA-27301: OS failure message: Bad file descriptor
ORA-27302: failure occurred at: skgxpdelpt1
ORA-01115: IO error reading block from file 105 (block # 18845)
ORA-01110: data file 105: '+DATOS/dac/datafile/auditoria.519.738586803'
ORA-15081: failed to submit an I/O operation to a disk
At the same time I search into the /var/log/messages as root user and I the error notice me the same problem:
Feb 7 11:03:58 bls3-1-1 syslog-ng[3346]: Cannot open file /var/log/mail.err for
writing (Too many open files in system)
Feb 7 11:04:56 bls3-1-1 kernel: VFS: file-max limit 131072 reached
Feb 7 11:05:05 bls3-1-1 kernel: oracle[12766]: segfault at fffffffffffffff0 rip
0000000007c76323 rsp 00007fff466dc780 error 4
I think I get clear about the cause, maybe I need to increase the fs.file-max kernel parameter but I do not know how to set a good value. Here you are my sysctl.conf file and the limits.conf file:
sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 17179869184
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6553600
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 4194304
limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536process limit
bcm@bcm-laptop:~$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited -
WL10 Compiler executable.exec error "too many open files" deploying ear
When I try to deploy an ear containing a web module and some ejb modules, I obtain this error:
<Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, MB-ADM_EAR [archive: /wl/wlments/MB-ADM_EAR/MB-ADM_EAR.ear], to Cluster1 .>
Task 1 initiated: [Deployer:149026]deploy application MB-ADM_EAR on Cluster1.
Task 1 failed: [Deployer:149026]deploy application MB-ADM_EAR on Cluster1.
Target state: deploy failed on Cluster Cluster1
java.io.IOException: Compiler failed executable.exec:
/wl/servers/MS1/cache/EJBCompilerCache/-1dj0waj53cbu8/it/apps/ejbs/core/ExSvc_167qnt_Impl.java:17: error while writing it.apps.ejbs.core.ExSvc_167qnt_Impl: /wl/servers/MS1/cache/EJBCompilerCache/-1dj0waj53cbu8/it/apps/ejbs/core/ExSvc_167qnt_Impl.class (Too many open files)If i split the ear in two parts, web in one ear and ejbs in another ear, deploy is succesfull.
Do you have any idea of what is happening?
Below the environment specifications:
JVM Version: jrockit_150_11
JVM Heap: 512
Web Logic: 10.0.1.0
Server: Hewlett Packard DL585 G2
OS: Linux / 2.6.5-7.287.3.PTF.345489.1-smp
Thank you, bye,
MarcoHello Marco.
When you try to deploy an EAR weblogic server at the time of deployment unjar's it and compiles the files and so on. Every Operating system has a limit on how many number of files can be opened by a process. If your EAR is big then the number of files which WLS will unjar will also be large hence you hit the limit. By splitting your ear into 2, you are splitting wls task into smaller parts, which means the number of files it unjars at a time is less.
The following note tells what needs to be done to avert this issue.
http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14772/weblogic_server_issues.htm#CHDGFFHD
Maybe you are looking for
-
HP officejet Pro 8100 will print from an Iphone but not from my windows laptop
HP officejet Pro 8100 will print from an Iphone but not from my windows laptop. I get an error stating "unable to communicate with printer"
-
Error when creating a new JMS connection factory in GlassFish V3 b57
When I use the admin console and try to create a new JMS connection factory in GlassFish V3 b57, the operation fails with the error message An error has occurred: Can't find ConfigModel.Property for attr -connection-validation-required on interface c
-
After use and not even long use dropdown menus are blank, Firefox won't close.
For a couple of weeks after a short time of use dropdown menus are blank almost as if they have been lifted off the screen but I can see an imprint of where they should be.. Sometimes running the cursor over them seems to make them appear but not oft
-
First single-boot Linux, in the future multi-boot after addition of Windows
The given hardware setup is 32Bits Pentium 4 with blank SATA HDD and BIOS. GPT is in seek on that HDD, not MBR. As next it will be setup to single-boot system with Linux. Means amongst others the disk is to be partitioned. However it is unclear if Li
-
Virus in OBServerDLL.dll ???
Hello, The heuristic scan from kaspersky as well as McAfee said, that OBServerDLL.dll (in Temp-Folder) is infected by a virus. Possible that it is one? A full scan of the computer found nothing. for any hint thanks in advance Edited by: Andreas Schl