Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Performance issues within our application

Dear Team,

We are currently facing an issue where memory is not being reduced, and we suspect that garbage collection is not functioning properly at the application server level. The application server, with 64GB of RAM and 8 CPUs, is running JDK 17. Despite our attempts to address the problem by applying the following JVM parameters, which previously worked flawlessly, we are still encountering the issue unexpectedly

JVM parameters:
export JAVA_OPTS='-server -Xms1g -Xmx48g
-XX:+UseG1GC -XX:SurvivorRatio=3
-XX:ConcGCThreads=4
-XX:ThreadStackSize=512
-XX:ParallelGCThreads=4
-XX:MaxMetaspaceSize=2g
-XX:MaxGCPauseMillis=150000
-XX:+HeapDumpOnOutOfMemoryError

Could you please suggest any additional parameters or adjustments that could help resolve this issue permanently?

Your prompt response would be greatly appreciated.

Note: Despite reducing the Xmx parameter from 48GB to 8GB, we are still encountering out-of-memory errors. Surprisingly, we have observed fluctuations in memory usage, with occasional increases and decreases as expected.

Thank you.
Best regards,
Ganeshpandi Eswaran.

Comments

PetarSimic

Hi, your variable sName is always empty, since you are not using it anywhere. Instaed try to select l_data variable.

anju abhi

thank you sir…..How to call a particular Variable from a json input ?

DECLARE
l_data CLOB;
sName VARCHAR2 (50);
l_url VARCHAR2 (1000) :=
'http://webservices.oorsprong.org/websamples.countryinfo/CountryInfoService.wso/ListOfContinentsByCode/JSON/debug?''';
BEGIN
l_data := apex_web_service.make_rest_request(
p_url => l_url,
p_http_method => 'GET'
);
WITH json_tab AS
(
SELECT l_data FROM dual
)
SELECT sName
INTO :P2_NAME
FROM json_tab;

EXCEPTION WHEN no_data_found THEN
:P2_NAME := '';

END;

Here Instead of l _data i tried with sName then also its not working …

jariola

Your API call seems to return array. Here is example query to get array values.

with json_data as(
 select
   treat( '[{"sCode":"AF","sName":"Africa"},{"sCode":"AM","sName":"The Americas"},{"sCode":"AN","sName":"Antarctica"},{"sCode":"AS","sName":"Asia"},{"sCode":"EU","sName":"Europe"},{"sCode":"OC","sName":"Ocenania"}]' as json) as doc
 from dual
)
select
  j.doc.sCode
, j.doc.sName
from json_data j
;

Another example, if you want array data to rows. But you can't use this select into your item, because it returns multiple rows

with json_data as(
 select
   '[{"sCode":"AF","sName":"Africa"},{"sCode":"AM","sName":"The Americas"},{"sCode":"AN","sName":"Antarctica"},{"sCode":"AS","sName":"Asia"},{"sCode":"EU","sName":"Europe"},{"sCode":"OC","sName":"Ocenania"}]' as doc
 from dual
)
select
  t.sCode
, t.sName
from json_data j,
 json_table( j.doc, '$[*]' 
   columns
     sCode,
     sName
 ) t
;
anju abhi

Thank you sir got it …

1 - 4

Post Details

Added on Mar 14 2024
2 comments
318 views