SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Triggers and Stored Procedures
Triggers and Stored ProceduresTriggers and Stored Procedures
Triggers and Stored Procedures
 
JavaFX Overview
JavaFX OverviewJavaFX Overview
JavaFX Overview
 
PLSQL
PLSQLPLSQL
PLSQL
 
Open shortest path first (ospf)
Open shortest path first (ospf)Open shortest path first (ospf)
Open shortest path first (ospf)
 
Java Collections
Java  Collections Java  Collections
Java Collections
 
Hack like a pro with burp suite - nullhyd
Hack like a pro with burp suite - nullhydHack like a pro with burp suite - nullhyd
Hack like a pro with burp suite - nullhyd
 
Fabric Path PPT by NETWORKERS HOME
Fabric Path PPT by NETWORKERS HOMEFabric Path PPT by NETWORKERS HOME
Fabric Path PPT by NETWORKERS HOME
 
Packages in PL/SQL
Packages in PL/SQLPackages in PL/SQL
Packages in PL/SQL
 
Advanced SQL
Advanced SQLAdvanced SQL
Advanced SQL
 
Sql injection in cybersecurity
Sql injection in cybersecuritySql injection in cybersecurity
Sql injection in cybersecurity
 
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
Take a load off! Load testing your Oracle APEX or JDeveloper web applicationsTake a load off! Load testing your Oracle APEX or JDeveloper web applications
Take a load off! Load testing your Oracle APEX or JDeveloper web applications
 
Oracle: PLSQL Introduction
Oracle: PLSQL IntroductionOracle: PLSQL Introduction
Oracle: PLSQL Introduction
 
Store procedures
Store proceduresStore procedures
Store procedures
 
02 Writing Executable Statments
02 Writing Executable Statments02 Writing Executable Statments
02 Writing Executable Statments
 
Thread
ThreadThread
Thread
 
VLAN, VTP, DTP, Ether channel Cheat Sheet With examples.pptx
VLAN, VTP, DTP, Ether channel  Cheat Sheet With examples.pptxVLAN, VTP, DTP, Ether channel  Cheat Sheet With examples.pptx
VLAN, VTP, DTP, Ether channel Cheat Sheet With examples.pptx
 
Connect Laptop/PC to Router Console Port
Connect Laptop/PC to Router Console Port Connect Laptop/PC to Router Console Port
Connect Laptop/PC to Router Console Port
 
UKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tipsUKOUG - 25 years of hints and tips
UKOUG - 25 years of hints and tips
 
Single Sign-On for APEX apps (Important: latest version on edocr!)
Single Sign-On for APEX apps (Important: latest version on edocr!)Single Sign-On for APEX apps (Important: latest version on edocr!)
Single Sign-On for APEX apps (Important: latest version on edocr!)
 
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
 

Destacado

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
 
APEX Behind the Scenes by Scott Spendolini
APEX Behind the Scenes by Scott SpendoliniAPEX Behind the Scenes by Scott Spendolini
APEX Behind the Scenes by Scott Spendolini
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
 
Apex behind the scenes
Apex behind the scenesApex behind the scenes
Apex behind the scenes
Enkitec
 

Destacado (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
 
APEX Behind the Scenes by Scott Spendolini
APEX Behind the Scenes by Scott SpendoliniAPEX Behind the Scenes by Scott Spendolini
APEX Behind the Scenes by Scott Spendolini
 
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
 
Apex behind the scenes
Apex behind the scenesApex behind the scenes
Apex behind the scenes
 
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
 

Similar a 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
 

Similar a 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
 

Más de 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
 

Más de 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
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 

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