SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Copyright © 2013 Apex Evangelists
Troubleshooting APEX
Applications
Nienke Gijsen en Roel Hartman
About Roel
• Director of APEX Evangelists NL
• 20+ years of Oracle Experience
• “RoelH” in the APEX Forum
• Presenter at KSCOPE, OOW, Collaborate, DOAG, UKOUG, ...
• Oracle ACE Director
• Blog @ http://roelhartman.blogspot.com
• Twitter : @RoelH
Enterprise Manager
Alert.log
• Twee tot drie keer per week
• Apex process
• ORA-04030: out of process memory when trying to allocate 82456
bytes (pga heap,control file i/o buffer)
• ORA-04030: out of process memory when trying to allocate 16328
bytes (koh-kghu sessi,pmucalm coll)
Trace File
PRIVATE HEAP SUMMARY DUMP
15 GB total:
15 GB commented, 183 KB permanent
81 KB free (0 KB in empty extents),
15 GB, 1 heap: "session heap "
declare
rc__ number;
simple_list__ owa_util.vc_arr;
complex_list__ owa_util.vc_arr;
begin
owa.init_cgi_env(:n__,:nm__,:v__);
htp.HTBUF_LEN := -1;
null;
null;
simple_list__(1) := 'sys.%';
simple_list__(2) := 'dbms_%';
simple_list__(3) := 'utl_%';
simple_list__(4) := 'owa_%';
simple_list__(5) := 'owa.%';
simple_list__(6) := 'htp.%';
simple_list__(7) := 'htf.%';
simple_list__(8) := 'wpg_docload.%';
if ((wwv_flow_epg_include_modules.authorize('wwv_flow_file_mgr.get_file') = false) or (owa_match.match_pattern(p_string =>
'wwv_flow_file_mgr.get_file'
Metalink
PLSQL Procedure Causing ORA-04030: (pga heap,control
file i/o buffer) And ORA-04030: (koh-kghu sessi,pmuccst:
adt/record) or ORA-04030: (koh-kghucall ,pmucalm coll)
Errors [ID 1325100.1]
Solution
• Change the page count at the OS level:
• $ more /proc/sys/vm/max_map_count
$ sysctl -w vm.max_map_count=262144 (256K)
Apex Developers
• Error log
• Tijdstippen onderzoek
• Wat doet de get_file?
• Wat kan er 16GB groot zijn?
En	
  nu?
DBA
Troubleshooting APEX Applications
Debugging Tracing Logging
Debugging APEX Applications
Debugging APEX Applications
• Develop Mode
• Runtime Mode
• Websheets needs a Development environment !
• @apxdvins.sql / @apxdevrm.sql
Debugging Enable - Develop Mode
• Application Level Setting
Debugging Enable - Runtime Mode
begin
wwv_flow_api.set_security_group_id(p_security_group_id=>2616513429239104);! !
wwv_flow_api.set_enable_app_debugging(103,1);
end;
Workspace ID
Application ID
1 = ON
0 = OFF
Debugging - Develop Mode
Debugging - Runtime Mode
LEVEL1 ..
LEVEL9
Debugging - Instrumentation
apex_debug
Remote Debugging
• Using SQL Developer
Tracing APEX Applications
Tracing Enable - Develop Mode
• Workspace Level Setting (default “Yes”)
Tracing Enable - Runtime Mode
begin
apex_instance_admin.set_parameter( p_parameter => 'TRACING_ENABLED'
, p_value => 'Y' );
end;
SYS, SYSTEM, APEX_040200 or APEX_ADMINISTRATOR_ROLE
Tracing - Develop & Runtime Mode
DEBUGGING must be enabled as well!
Logging APEX Applications
Logging Enable - Develop Mode
• Workspace Level Setting (default “U”)
• Application Level Setting (default “Yes”)
Logging Enable - Runtime Mode
• Workspace Level Setting (default “U”)
begin
apex_instance_admin.set_parameter( p_parameter => 'APPLICATION_ACTIVITY_LOGGING'
, p_value => 'U' ); -- or [A]lways, [N]ever
end;
• Application Level Setting (default “Yes”)
begin
wwv_flow_api.set_security_group_id(p_security_group_id=>2616513429239104);!
wwv_flow_api.set_logging(103,‘YES’); -- Or ‘NO’ to switch it off
end;
Logging - Where Is It Going?
SELECT apex_view_name, comments
FROM apex_dictionary
where column_id = 0
AND apex_view_name LIKE '%LOG%'
•
Logging - How Long Is It In There?
• Workspace Level Setting
• Develop Mode
• Runtime Mode
begin
apex_instance_admin.set_log_switch_interval
( p_log_name in 'ACTIVITY' -- or ‘ACCESS’, ‘CLICKTHRU’, ‘DEBUG’
, p_log_switch_after_days => 180 ); -- between 1 and 180, default 14
end;
• Rotating Logs
Logging Examining - Develop Mode
Logging Examining - Runtime Mode
select application_id
, page_id
, to_char(view_date, 'DD-MM-YYYY HH24:MI') datetime
, log_context
, elapsed_time
, rows_queried
from apex_workspace_activity_log
order by elapsed_time desc
The Results
• Fluctuating Performance (avg 0.1 - max 1000 sec)
• Calls to WWV_FLOW_FILE_MGR.GET_FILE
• Used to retrieve images from the database
The Cause
•SELECT ‘<img src=”#WORKSPACE_IMAGES#no_picture.jpg”>’ ...
FROM <awesome join>
WHERE <more or less restrictions>
• Calls WWV_FLOW_FILE_MGR.GET_FILE tons of time
to retrieve ... nothing ....
The Solution
• Moved all images (and CSS / JavaScript) to web server
• Replaced ‘<img src=”#WORKSPACE_IMAGES#no_picture.jpg”>’
with ‘<img src=”/my_img/no_picture.jpg”>’
• Now using web server caching
• Database isn’t suffering from millions of calls anymore
Copyright © 2013 Apex Evangelists
http://apex-evangelists.com
Q& A
roel@apex-evangelists.com
http://apex-evangelists.com

Weitere ähnliche Inhalte

Was ist angesagt?

Making Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichMaking Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph Ruepprich
Enkitec
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
Carlos Sierra
 

Was ist angesagt? (20)

Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
Testes em uma arquitetura com messageria/streaming (Kafka)
Testes em uma arquitetura com messageria/streaming (Kafka)Testes em uma arquitetura com messageria/streaming (Kafka)
Testes em uma arquitetura com messageria/streaming (Kafka)
 
Setup Oracle eBS 2 Oracle BI SSO
Setup Oracle eBS 2 Oracle BI SSOSetup Oracle eBS 2 Oracle BI SSO
Setup Oracle eBS 2 Oracle BI SSO
 
Beginner's Guide to APEX
Beginner's Guide to APEXBeginner's Guide to APEX
Beginner's Guide to APEX
 
Making Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph RuepprichMaking Sense of APEX Security by Christoph Ruepprich
Making Sense of APEX Security by Christoph Ruepprich
 
Explain the explain_plan
Explain the explain_planExplain the explain_plan
Explain the explain_plan
 
Oracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web ServicesOracle REST Data Services: Options for your Web Services
Oracle REST Data Services: Options for your Web Services
 
Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360Understanding my database through SQL*Plus using the free tool eDB360
Understanding my database through SQL*Plus using the free tool eDB360
 
Airflow at lyft
Airflow at lyftAirflow at lyft
Airflow at lyft
 
Parquet performance tuning: the missing guide
Parquet performance tuning: the missing guideParquet performance tuning: the missing guide
Parquet performance tuning: the missing guide
 
API
APIAPI
API
 
How to Use Oracle RAC in a Cloud? - A Support Question
How to Use Oracle RAC in a Cloud? - A Support QuestionHow to Use Oracle RAC in a Cloud? - A Support Question
How to Use Oracle RAC in a Cloud? - A Support Question
 
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginnersUnderstanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginners
 
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
Deep Dive into Spark SQL with Advanced Performance Tuning with Xiao Li & Wenc...
 
Chasing the optimizer
Chasing the optimizerChasing the optimizer
Chasing the optimizer
 
Performance Tuning Using oratop
Performance Tuning Using oratop Performance Tuning Using oratop
Performance Tuning Using oratop
 
Oracle Cloud is Best for Oracle Database - High Availability
Oracle Cloud is Best for Oracle Database - High AvailabilityOracle Cloud is Best for Oracle Database - High Availability
Oracle Cloud is Best for Oracle Database - High Availability
 
Elastic Stack Introduction
Elastic Stack IntroductionElastic Stack Introduction
Elastic Stack Introduction
 
ELK Elasticsearch Logstash and Kibana Stack for Log Management
ELK Elasticsearch Logstash and Kibana Stack for Log ManagementELK Elasticsearch Logstash and Kibana Stack for Log Management
ELK Elasticsearch Logstash and Kibana Stack for Log Management
 

Andere mochten auch

LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
Enkitec
 
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Roel Hartman
 

Andere mochten auch (20)

Oracle Text in APEX
Oracle Text in APEXOracle Text in APEX
Oracle Text in APEX
 
Mastering universal theme
Mastering universal themeMastering universal theme
Mastering universal theme
 
APEX Developers : Do More With LESS !
APEX Developers : Do More With LESS !APEX Developers : Do More With LESS !
APEX Developers : Do More With LESS !
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
 
Automated testing APEX Applications
Automated testing APEX ApplicationsAutomated testing APEX Applications
Automated testing APEX Applications
 
Striving for Perfection: The Ultimate APEX Application Architecture
Striving for Perfection: The Ultimate APEX Application ArchitectureStriving for Perfection: The Ultimate APEX Application Architecture
Striving for Perfection: The Ultimate APEX Application Architecture
 
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sMy Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API's
 
Ten Tiny Things To Try Today - Hidden APEX5 Gems Revealed
Ten Tiny Things To Try Today - Hidden APEX5 Gems RevealedTen Tiny Things To Try Today - Hidden APEX5 Gems Revealed
Ten Tiny Things To Try Today - Hidden APEX5 Gems Revealed
 
WebXpress 3PL Management
WebXpress 3PL ManagementWebXpress 3PL Management
WebXpress 3PL Management
 
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
 
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
 
APEX printing with BI Publisher
APEX printing with BI PublisherAPEX printing with BI Publisher
APEX printing with BI Publisher
 
Integration of APEX and Oracle Forms
Integration of APEX and Oracle FormsIntegration of APEX and Oracle Forms
Integration of APEX and Oracle Forms
 
AMIS - Can collections speed up your PL/SQL?
AMIS - Can collections speed up your PL/SQL?AMIS - Can collections speed up your PL/SQL?
AMIS - Can collections speed up your PL/SQL?
 
Oracle query optimizer
Oracle query optimizerOracle query optimizer
Oracle query optimizer
 
Oracle - SQL-PL/SQL context switching
Oracle - SQL-PL/SQL context switchingOracle - SQL-PL/SQL context switching
Oracle - SQL-PL/SQL context switching
 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result Cache
 
PLSQL Standards and Best Practices
PLSQL Standards and Best PracticesPLSQL Standards and Best Practices
PLSQL Standards and Best Practices
 
Generic collection types in PLSQL
Generic collection types in PLSQLGeneric collection types in PLSQL
Generic collection types in PLSQL
 
Oracle PL/SQL exception handling
Oracle PL/SQL exception handlingOracle PL/SQL exception handling
Oracle PL/SQL exception handling
 

Ähnlich wie Troubleshooting APEX Performance Issues

OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Final
jucaab
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Kristofferson A
 
backgroundcommunicationandwaitevents-180124221026.pdf
backgroundcommunicationandwaitevents-180124221026.pdfbackgroundcommunicationandwaitevents-180124221026.pdf
backgroundcommunicationandwaitevents-180124221026.pdf
ssuser785ce21
 
OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...
OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...
OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...
Kristofferson A
 
Ruby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrādeRuby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrāde
Raimonds Simanovskis
 
Oracle Cloud DBaaS
Oracle Cloud DBaaSOracle Cloud DBaaS
Oracle Cloud DBaaS
Arush Jain
 

Ähnlich wie Troubleshooting APEX Performance Issues (20)

Turbocharge SQL Performance in PL/SQL with Bulk Processing
Turbocharge SQL Performance in PL/SQL with Bulk ProcessingTurbocharge SQL Performance in PL/SQL with Bulk Processing
Turbocharge SQL Performance in PL/SQL with Bulk Processing
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Final
 
AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016AWR, ASH with EM13 at HotSos 2016
AWR, ASH with EM13 at HotSos 2016
 
New Features in Oracle ORAchk & EXAchk 12.2.0.1.1
New Features in Oracle ORAchk & EXAchk 12.2.0.1.1New Features in Oracle ORAchk & EXAchk 12.2.0.1.1
New Features in Oracle ORAchk & EXAchk 12.2.0.1.1
 
Ora 4 the_sqldba
Ora 4 the_sqldbaOra 4 the_sqldba
Ora 4 the_sqldba
 
Extending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on RailsExtending Oracle E-Business Suite with Ruby on Rails
Extending Oracle E-Business Suite with Ruby on Rails
 
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
 
Maximizing Oracle RAC Uptime
Maximizing Oracle RAC UptimeMaximizing Oracle RAC Uptime
Maximizing Oracle RAC Uptime
 
REST Enabling Your Oracle Database
REST Enabling Your Oracle DatabaseREST Enabling Your Oracle Database
REST Enabling Your Oracle Database
 
20160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab0120160821 coscup-my sql57docstorelab01
20160821 coscup-my sql57docstorelab01
 
Introdução ao Oracle NoSQL
Introdução ao Oracle NoSQLIntrodução ao Oracle NoSQL
Introdução ao Oracle NoSQL
 
ODTUG Webinar AWR Warehouse
ODTUG Webinar AWR WarehouseODTUG Webinar AWR Warehouse
ODTUG Webinar AWR Warehouse
 
backgroundcommunicationandwaitevents-180124221026.pdf
backgroundcommunicationandwaitevents-180124221026.pdfbackgroundcommunicationandwaitevents-180124221026.pdf
backgroundcommunicationandwaitevents-180124221026.pdf
 
OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...
OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...
OOW Unconference 2010: Mining the AWR repository for Capacity Planning, Visua...
 
MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)MySQL Cluster as Transactional NoSQL (KVS)
MySQL Cluster as Transactional NoSQL (KVS)
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
 
Free oracle performance tools
Free oracle performance toolsFree oracle performance tools
Free oracle performance tools
 
Ruby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrādeRuby on Rails Oracle adaptera izstrāde
Ruby on Rails Oracle adaptera izstrāde
 
Oracle Cloud DBaaS
Oracle Cloud DBaaSOracle Cloud DBaaS
Oracle Cloud DBaaS
 
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
제3회난공불락 오픈소스 인프라세미나 - MySQL Performance
 

Mehr von Roel Hartman

Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
Roel Hartman
 

Mehr von Roel Hartman (10)

Wizard of ORDS
Wizard of ORDSWizard of ORDS
Wizard of ORDS
 
APEX Bad Practices
APEX Bad PracticesAPEX Bad Practices
APEX Bad Practices
 
Tweaking the interactive grid
Tweaking the interactive gridTweaking the interactive grid
Tweaking the interactive grid
 
Docker for Dummies
Docker for DummiesDocker for Dummies
Docker for Dummies
 
A deep dive into APEX JET charts
A deep dive into APEX JET chartsA deep dive into APEX JET charts
A deep dive into APEX JET charts
 
5 Cool Things you can do with HTML5 and APEX
5 Cool Things you can do with HTML5 and APEX5 Cool Things you can do with HTML5 and APEX
5 Cool Things you can do with HTML5 and APEX
 
XFILES, the APEX 4 version - The truth is in there
XFILES, the APEX 4 version - The truth is in thereXFILES, the APEX 4 version - The truth is in there
XFILES, the APEX 4 version - The truth is in there
 
Done in 60 seconds - Creating Web 2.0 applications made easy
Done in 60 seconds - Creating Web 2.0 applications made easyDone in 60 seconds - Creating Web 2.0 applications made easy
Done in 60 seconds - Creating Web 2.0 applications made easy
 
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
Tales from a Parallel Universe: Using Oracle 11gR2's Edition Based Redefiniti...
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Troubleshooting APEX Performance Issues

  • 1. Copyright © 2013 Apex Evangelists Troubleshooting APEX Applications Nienke Gijsen en Roel Hartman
  • 2. About Roel • Director of APEX Evangelists NL • 20+ years of Oracle Experience • “RoelH” in the APEX Forum • Presenter at KSCOPE, OOW, Collaborate, DOAG, UKOUG, ... • Oracle ACE Director • Blog @ http://roelhartman.blogspot.com • Twitter : @RoelH
  • 4. Alert.log • Twee tot drie keer per week • Apex process • ORA-04030: out of process memory when trying to allocate 82456 bytes (pga heap,control file i/o buffer) • ORA-04030: out of process memory when trying to allocate 16328 bytes (koh-kghu sessi,pmucalm coll)
  • 5. Trace File PRIVATE HEAP SUMMARY DUMP 15 GB total: 15 GB commented, 183 KB permanent 81 KB free (0 KB in empty extents), 15 GB, 1 heap: "session heap " declare rc__ number; simple_list__ owa_util.vc_arr; complex_list__ owa_util.vc_arr; begin owa.init_cgi_env(:n__,:nm__,:v__); htp.HTBUF_LEN := -1; null; null; simple_list__(1) := 'sys.%'; simple_list__(2) := 'dbms_%'; simple_list__(3) := 'utl_%'; simple_list__(4) := 'owa_%'; simple_list__(5) := 'owa.%'; simple_list__(6) := 'htp.%'; simple_list__(7) := 'htf.%'; simple_list__(8) := 'wpg_docload.%'; if ((wwv_flow_epg_include_modules.authorize('wwv_flow_file_mgr.get_file') = false) or (owa_match.match_pattern(p_string => 'wwv_flow_file_mgr.get_file'
  • 6. Metalink PLSQL Procedure Causing ORA-04030: (pga heap,control file i/o buffer) And ORA-04030: (koh-kghu sessi,pmuccst: adt/record) or ORA-04030: (koh-kghucall ,pmucalm coll) Errors [ID 1325100.1] Solution • Change the page count at the OS level: • $ more /proc/sys/vm/max_map_count $ sysctl -w vm.max_map_count=262144 (256K)
  • 7. Apex Developers • Error log • Tijdstippen onderzoek • Wat doet de get_file? • Wat kan er 16GB groot zijn?
  • 11. Debugging APEX Applications • Develop Mode • Runtime Mode • Websheets needs a Development environment ! • @apxdvins.sql / @apxdevrm.sql
  • 12. Debugging Enable - Develop Mode • Application Level Setting
  • 13. Debugging Enable - Runtime Mode begin wwv_flow_api.set_security_group_id(p_security_group_id=>2616513429239104);! ! wwv_flow_api.set_enable_app_debugging(103,1); end; Workspace ID Application ID 1 = ON 0 = OFF
  • 15. Debugging - Runtime Mode LEVEL1 .. LEVEL9
  • 17. Remote Debugging • Using SQL Developer
  • 19. Tracing Enable - Develop Mode • Workspace Level Setting (default “Yes”)
  • 20. Tracing Enable - Runtime Mode begin apex_instance_admin.set_parameter( p_parameter => 'TRACING_ENABLED' , p_value => 'Y' ); end; SYS, SYSTEM, APEX_040200 or APEX_ADMINISTRATOR_ROLE
  • 21. Tracing - Develop & Runtime Mode DEBUGGING must be enabled as well!
  • 23. Logging Enable - Develop Mode • Workspace Level Setting (default “U”) • Application Level Setting (default “Yes”)
  • 24. Logging Enable - Runtime Mode • Workspace Level Setting (default “U”) begin apex_instance_admin.set_parameter( p_parameter => 'APPLICATION_ACTIVITY_LOGGING' , p_value => 'U' ); -- or [A]lways, [N]ever end; • Application Level Setting (default “Yes”) begin wwv_flow_api.set_security_group_id(p_security_group_id=>2616513429239104);! wwv_flow_api.set_logging(103,‘YES’); -- Or ‘NO’ to switch it off end;
  • 25. Logging - Where Is It Going? SELECT apex_view_name, comments FROM apex_dictionary where column_id = 0 AND apex_view_name LIKE '%LOG%' •
  • 26. Logging - How Long Is It In There? • Workspace Level Setting • Develop Mode • Runtime Mode begin apex_instance_admin.set_log_switch_interval ( p_log_name in 'ACTIVITY' -- or ‘ACCESS’, ‘CLICKTHRU’, ‘DEBUG’ , p_log_switch_after_days => 180 ); -- between 1 and 180, default 14 end; • Rotating Logs
  • 27. Logging Examining - Develop Mode
  • 28. Logging Examining - Runtime Mode select application_id , page_id , to_char(view_date, 'DD-MM-YYYY HH24:MI') datetime , log_context , elapsed_time , rows_queried from apex_workspace_activity_log order by elapsed_time desc
  • 29. The Results • Fluctuating Performance (avg 0.1 - max 1000 sec) • Calls to WWV_FLOW_FILE_MGR.GET_FILE • Used to retrieve images from the database
  • 30. The Cause •SELECT ‘<img src=”#WORKSPACE_IMAGES#no_picture.jpg”>’ ... FROM <awesome join> WHERE <more or less restrictions> • Calls WWV_FLOW_FILE_MGR.GET_FILE tons of time to retrieve ... nothing ....
  • 31. The Solution • Moved all images (and CSS / JavaScript) to web server • Replaced ‘<img src=”#WORKSPACE_IMAGES#no_picture.jpg”>’ with ‘<img src=”/my_img/no_picture.jpg”>’ • Now using web server caching • Database isn’t suffering from millions of calls anymore
  • 32. Copyright © 2013 Apex Evangelists http://apex-evangelists.com Q& A