SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
Debugging, Monitoring and
Profiling
Fabrizio Branca
fabrizio (dot) branca (at) aoemedia (dot) de
Twitter: @fbrnc
This talk is…
• sharing some best practices
• sharing some tools with you
• an (incomplete) checklist
• a reminder (hopefully)
Fabrizio Branca
What is this all about?
• Make your website run smoothly!
• during development…
• and when the site is online
• “Smoothly” is
• No bugs (unexpected behaviour)
• Stability
• Performance
Fabrizio Branca
This talk is about
How to…
• avoid errors
• detect errors
• deal with errors
• notify yourself when errors have occurred
Fabrizio Branca
It„s all about bugs
Fabrizio Branca
It„s all about bugs
Everybody creates bugs. Nobody is perfect.
A high percentage of coding time goes into
• searching for bugs
• fixing bugs
Increase your productivity by reducing this time!
Fabrizio Branca
Automating
• Automatize error recognition
• Use proper tools
• Automatize error reporting
• Route detailed error reports into your mailbox
Fabrizio Branca
Bugs
• Avoid bugs
• through programming style
• Spot bugs fast
• “Safety nets”: Unit tests, Assertions
• Detect them before the customer and/or
the website user finds them
Fabrizio Branca
Avoid bugs
• Use a proper IDE
• Syntax checks
• Code Completion
Coding style
• Cover all cases: No if without else!
• Use type hints wherever possible
• Stick to patterns
• Increase crearity
• Convention over configuration
• KISS
• Use object collections
• Make it easier for team members to find and fix bugs
(increase the truck factor) by sticking to coding
guidelines and patterns
Fabrizio Branca
What does PHP offer?
• log_errors
• display_errors
• error_log
Set values in
• php.ini
• .htaccess / vhost configuration
Fabrizio Branca
What does TYPO3 offer?
• devLog, sysLog, Tslog
• devIpMask
• Deprecation log
• Page not found / Page unavailable
• Exception handling
• Error handling
• Debug Console in the BE
Fabrizio Branca
Deal with exceptions (I)
How to react when an exception has
occurred?
• Don„t display any details to the user!
• Send a correct HTTP status code (for
search engines and log files)
$GLOBALS['TSFE']->pageNotFoundAndExit($errorHandlerMessage);
$GLOBALS['TSFE']->pageUnavailableAndExit($errorHandlerMessage);
Fabrizio Branca
Page not found
Fabrizio Branca
Page unavailable
Fabrizio Branca
Deal with exceptions (II)
Handle exceptions within your controllers.
Notify yourself:
• write a message to devLog
• write a message to sysLog
• write a message to TSLog
Fabrizio Branca
Exception Handler
Fabrizio Branca
Bug detection
• Bugs are harder to fix the later they are
detected
• Bugs become harder to diagnose the
further the symptom is removed from the
cause
Fabrizio Branca
Bug detection with assertions
• Make sure that variables contain what you
expect at any time (e.g. after calling a function)
• E.g.: Check incoming parameters for correct
type
• Simple one line call:
tx_pttools_assert::isValidUid($this->params['uid']);
• Throws an exception if assertion is not true
• http://articles.sitepoint.com/article/bug-detection-php-assertions
http://debuggable.com/posts/assert-the-yummyness-of-your-cake:480f4dd6-
7fe0-4113-9776-458acbdd56cb
Fabrizio Branca
Bug detection with assertions
• Assertions are easy to use.
• Don„t assume anything, check it!
• Example: ini_set()
• No substitute for unit tests!
Fabrizio Branca
Bug detection with assertions
See
EXT:pt_tools/res/staticlib/class.tx_pttools_assert.php
or
build your own assert class
Some examples:
• tx_pttools_assert::isValidUid();
• tx_pttools_assert::isNotEmptyString();
Fabrizio Branca
t3lib_div::devLog()
Fabrizio Branca
t3lib_div::sysLog()
Decides by configuration how to handle
syslog messages
• send mail
• write to log file
• write to OS syslog
Fabrizio Branca
Custom SysLog Handler
See
EXT:tcaobjects/res/class.tx_tcaobjects_syslog.php
Fabrizio Branca
SysLog notification mail
msg: Assertion "isValidUid" failed!
extKey: pt_tools
severity: 3
exceptionClass: tx_pttools_exceptionAssertion
debugMsg:
file: /var/www/burghalle/integration/htdocs/typo3conf/ext/aoe_burg/controller/class.tx_aoeburg_controller_extranet.php
line: 78
function: tx_aoeburg_controller_extranet::init
assertType: isValidUid
val:
expected: 1
Server:
TYPO3_REQUEST_URL: http://www.integration.burghalle.aoe-works.de/xtranet/uebersicht/artikel-
bearbeiten/e/typo3conf/ext/burghalle_template/i/white-75.png
HTTP_REFERER: http://www.integration.burghalle.aoe-works.de/xtranet/uebersicht/artikel-bearbeiten/e/saveContent.html
POST: -- none --
COOKIE:
condensed: 0
fe_typo_user: 6b7ccec749891321cb6e7e2fc4c685a4
PHPSESSID: 4b8712f5a4c845029da1f2332cf9132b
Client:
HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 ( .NET CLR
3.5.30729; .NET4.0C)
Spider: No
REMOTE_HOST: [null]
REMOTE_ADDR: 217.19.187.106
User:
FE_User: aoe
BE_User: -- no user --
Trace: [...]
$TYPO3_DB-
>debug_check_recordset()
• Check all database queries
• Debug_check_recordset takes care of
writing log messages
Fabrizio Branca
TSlog
Fabrizio Branca
$TT->push() / ->pull()
Use the timetrack object to keep track of
what happens in your code.
Fabrizio Branca
Reports module
Fabrizio Branca
Reports module
Write your own reports
Examples:
• Table size
• Outdated extensions (extension manager)
• TCA Integrity
• TCA/database integrity (Like Compare tool)
• Extension integrity (dependencies, conflicts)
• Free disk space
• Server load
Fabrizio Branca
Define a strong api
• Provide interfaces for hooks.
• Allow alternatives (pagerStrategy,
viewClass,…)
Fabrizio Branca
Keep an eye on the logs…
• Webserver
• Apache error log
• PHP error log
• TYPO3
• Log module (Core error handler…)
• Admin Panel
• RealUrl
• error log
• are all paramters encoded?
• Deprecation log
• Reports module
Fabrizio Branca
Keep an eye on the logs…
• External tools
• Google Webmaster Tools
• Wget
• Piwik
• MySQL
• Slow query log
• OS (*nix)
• Syslog
Fabrizio Branca
Log Module
Fabrizio Branca
Google Webmaster Tools
Fabrizio Branca
Let tools do the analysis
• PHP
• TSFE
• TypoScript
• jQuery code
• HTML
• CSS
• RSS
Fabrizio Branca
Visualizing xdebug profiling
Visualizing xdebug profiling
Visualizing pdepend xml
jQuery Lint
„Runtime Reporter“
http://james.padolsey.com/javascript/jquery-lint/
Fabrizio Branca
TypoScript Check (lint)
Proof of concept!
Xclassing tslib_content:
function stdWrap($content,$conf) {
$this->getLinkChecker()->check($conf, 'stdWrap');
return parent::stdWrap($content, $conf);
}
Fabrizio Branca
Tick
Tick
Fabrizio Branca
Tick
Use validators
Use validators for validating
• HTML
• CSS
• RSS
Keep an eye on editor„s content
Fabrizio Branca
Spot performance killers
• Use USER_INTs only if really needed.
• Create links with cHashes
• Avoid putting USER_INTs on all pages
(load them via ajax)
• Cache headers
• Static publishing
Fabrizio Branca
Monitoring
• Configure your TYPO3 instances to notify
you when errors occur.
• Use Monitoring tools (e.g. Nagios,
Caretaker?)
Fabrizio Branca
Pingdom
Maintainance
• Delete old temp files
find ../htdocs/typo3temp -type f -mtime +28 -delete
• Delete deleted records
• Delete unreferenced files
• Cleanup/check database
Fabrizio Branca

Más contenido relacionado

Más de AOE

Más de AOE (20)

Flamingo presentation at code.talks commerce by Daniel Pötzinger
Flamingo presentation at code.talks commerce by Daniel PötzingerFlamingo presentation at code.talks commerce by Daniel Pötzinger
Flamingo presentation at code.talks commerce by Daniel Pötzinger
 
A bag full of trust - Christof Braun at AOE Conference 2018
A bag full of trust - Christof Braun at AOE Conference 2018A bag full of trust - Christof Braun at AOE Conference 2018
A bag full of trust - Christof Braun at AOE Conference 2018
 
Digitalizing the Global Travel Retail World - Kian Gould at Global Retailing ...
Digitalizing the Global Travel Retail World - Kian Gould at Global Retailing ...Digitalizing the Global Travel Retail World - Kian Gould at Global Retailing ...
Digitalizing the Global Travel Retail World - Kian Gould at Global Retailing ...
 
Frankfurt Airport Digitalization Case Study
Frankfurt Airport Digitalization Case StudyFrankfurt Airport Digitalization Case Study
Frankfurt Airport Digitalization Case Study
 
This is what has to change for Travel Retail to survive - Manuel Heidler, AOE
This is what has to change for Travel Retail to survive - Manuel Heidler, AOEThis is what has to change for Travel Retail to survive - Manuel Heidler, AOE
This is what has to change for Travel Retail to survive - Manuel Heidler, AOE
 
AOEconf17: Application Security
AOEconf17: Application SecurityAOEconf17: Application Security
AOEconf17: Application Security
 
AOEconf17: AOE Tech Radar Insights
AOEconf17: AOE Tech Radar InsightsAOEconf17: AOE Tech Radar Insights
AOEconf17: AOE Tech Radar Insights
 
AOEconf17: A flight through our OM³ Systems
AOEconf17: A flight through our OM³ SystemsAOEconf17: A flight through our OM³ Systems
AOEconf17: A flight through our OM³ Systems
 
AOEconf17: AOE Tech Radar Insights
AOEconf17: AOE Tech Radar InsightsAOEconf17: AOE Tech Radar Insights
AOEconf17: AOE Tech Radar Insights
 
AOEconf17: Pets vs. Cattle - modern Application Infrastructure - by Fabrizio ...
AOEconf17: Pets vs. Cattle - modern Application Infrastructure - by Fabrizio ...AOEconf17: Pets vs. Cattle - modern Application Infrastructure - by Fabrizio ...
AOEconf17: Pets vs. Cattle - modern Application Infrastructure - by Fabrizio ...
 
AOEconf17: Agile scaling concepts
AOEconf17: Agile scaling conceptsAOEconf17: Agile scaling concepts
AOEconf17: Agile scaling concepts
 
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
AOEcon17: Searchperience - The journey from PHP and Solr to Scala and Elastic...
 
AOEconf17: UI challenges in a microservice world
AOEconf17: UI challenges in a microservice worldAOEconf17: UI challenges in a microservice world
AOEconf17: UI challenges in a microservice world
 
AOEconf17: Application Security - Bastian Ike
AOEconf17: Application Security - Bastian IkeAOEconf17: Application Security - Bastian Ike
AOEconf17: Application Security - Bastian Ike
 
AOEconf17: Management 3.0 - the secret to happy, performing and motivated sel...
AOEconf17: Management 3.0 - the secret to happy, performing and motivated sel...AOEconf17: Management 3.0 - the secret to happy, performing and motivated sel...
AOEconf17: Management 3.0 - the secret to happy, performing and motivated sel...
 
AOEconf17: How to eat an elePHPant, congstar style - Timo Fuchs & Stefan Rotsch
AOEconf17: How to eat an elePHPant, congstar style - Timo Fuchs & Stefan RotschAOEconf17: How to eat an elePHPant, congstar style - Timo Fuchs & Stefan Rotsch
AOEconf17: How to eat an elePHPant, congstar style - Timo Fuchs & Stefan Rotsch
 
Joern Bock: The basic concept of an agile organisation
Joern Bock: The basic concept of an agile organisationJoern Bock: The basic concept of an agile organisation
Joern Bock: The basic concept of an agile organisation
 
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
Magento 2 Best Practice Workfow // David Lambauer // Meet Magento 2017 // Lei...
 
SUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with MagentoSUPER-scaling E-Commerce with Magento
SUPER-scaling E-Commerce with Magento
 
How to eat an elephant
How to eat an elephantHow to eat an elephant
How to eat an elephant
 

Último

Último (20)

TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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...
 
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...
 
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
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 

Debugging, Monitoring and Profiling in TYPO3

  • 1. Debugging, Monitoring and Profiling Fabrizio Branca fabrizio (dot) branca (at) aoemedia (dot) de Twitter: @fbrnc
  • 2. This talk is… • sharing some best practices • sharing some tools with you • an (incomplete) checklist • a reminder (hopefully) Fabrizio Branca
  • 3. What is this all about? • Make your website run smoothly! • during development… • and when the site is online • “Smoothly” is • No bugs (unexpected behaviour) • Stability • Performance Fabrizio Branca
  • 4. This talk is about How to… • avoid errors • detect errors • deal with errors • notify yourself when errors have occurred Fabrizio Branca
  • 5. It„s all about bugs Fabrizio Branca
  • 6. It„s all about bugs Everybody creates bugs. Nobody is perfect. A high percentage of coding time goes into • searching for bugs • fixing bugs Increase your productivity by reducing this time! Fabrizio Branca
  • 7. Automating • Automatize error recognition • Use proper tools • Automatize error reporting • Route detailed error reports into your mailbox Fabrizio Branca
  • 8. Bugs • Avoid bugs • through programming style • Spot bugs fast • “Safety nets”: Unit tests, Assertions • Detect them before the customer and/or the website user finds them Fabrizio Branca
  • 9. Avoid bugs • Use a proper IDE • Syntax checks • Code Completion
  • 10. Coding style • Cover all cases: No if without else! • Use type hints wherever possible • Stick to patterns • Increase crearity • Convention over configuration • KISS • Use object collections • Make it easier for team members to find and fix bugs (increase the truck factor) by sticking to coding guidelines and patterns Fabrizio Branca
  • 11. What does PHP offer? • log_errors • display_errors • error_log Set values in • php.ini • .htaccess / vhost configuration Fabrizio Branca
  • 12. What does TYPO3 offer? • devLog, sysLog, Tslog • devIpMask • Deprecation log • Page not found / Page unavailable • Exception handling • Error handling • Debug Console in the BE Fabrizio Branca
  • 13. Deal with exceptions (I) How to react when an exception has occurred? • Don„t display any details to the user! • Send a correct HTTP status code (for search engines and log files) $GLOBALS['TSFE']->pageNotFoundAndExit($errorHandlerMessage); $GLOBALS['TSFE']->pageUnavailableAndExit($errorHandlerMessage); Fabrizio Branca
  • 16. Deal with exceptions (II) Handle exceptions within your controllers. Notify yourself: • write a message to devLog • write a message to sysLog • write a message to TSLog Fabrizio Branca
  • 18. Bug detection • Bugs are harder to fix the later they are detected • Bugs become harder to diagnose the further the symptom is removed from the cause Fabrizio Branca
  • 19. Bug detection with assertions • Make sure that variables contain what you expect at any time (e.g. after calling a function) • E.g.: Check incoming parameters for correct type • Simple one line call: tx_pttools_assert::isValidUid($this->params['uid']); • Throws an exception if assertion is not true • http://articles.sitepoint.com/article/bug-detection-php-assertions http://debuggable.com/posts/assert-the-yummyness-of-your-cake:480f4dd6- 7fe0-4113-9776-458acbdd56cb Fabrizio Branca
  • 20. Bug detection with assertions • Assertions are easy to use. • Don„t assume anything, check it! • Example: ini_set() • No substitute for unit tests! Fabrizio Branca
  • 21. Bug detection with assertions See EXT:pt_tools/res/staticlib/class.tx_pttools_assert.php or build your own assert class Some examples: • tx_pttools_assert::isValidUid(); • tx_pttools_assert::isNotEmptyString(); Fabrizio Branca
  • 22.
  • 24. t3lib_div::sysLog() Decides by configuration how to handle syslog messages • send mail • write to log file • write to OS syslog Fabrizio Branca
  • 26. SysLog notification mail msg: Assertion "isValidUid" failed! extKey: pt_tools severity: 3 exceptionClass: tx_pttools_exceptionAssertion debugMsg: file: /var/www/burghalle/integration/htdocs/typo3conf/ext/aoe_burg/controller/class.tx_aoeburg_controller_extranet.php line: 78 function: tx_aoeburg_controller_extranet::init assertType: isValidUid val: expected: 1 Server: TYPO3_REQUEST_URL: http://www.integration.burghalle.aoe-works.de/xtranet/uebersicht/artikel- bearbeiten/e/typo3conf/ext/burghalle_template/i/white-75.png HTTP_REFERER: http://www.integration.burghalle.aoe-works.de/xtranet/uebersicht/artikel-bearbeiten/e/saveContent.html POST: -- none -- COOKIE: condensed: 0 fe_typo_user: 6b7ccec749891321cb6e7e2fc4c685a4 PHPSESSID: 4b8712f5a4c845029da1f2332cf9132b Client: HTTP_USER_AGENT: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 ( .NET CLR 3.5.30729; .NET4.0C) Spider: No REMOTE_HOST: [null] REMOTE_ADDR: 217.19.187.106 User: FE_User: aoe BE_User: -- no user -- Trace: [...]
  • 27. $TYPO3_DB- >debug_check_recordset() • Check all database queries • Debug_check_recordset takes care of writing log messages Fabrizio Branca
  • 29. $TT->push() / ->pull() Use the timetrack object to keep track of what happens in your code. Fabrizio Branca
  • 31. Reports module Write your own reports Examples: • Table size • Outdated extensions (extension manager) • TCA Integrity • TCA/database integrity (Like Compare tool) • Extension integrity (dependencies, conflicts) • Free disk space • Server load Fabrizio Branca
  • 32. Define a strong api • Provide interfaces for hooks. • Allow alternatives (pagerStrategy, viewClass,…) Fabrizio Branca
  • 33. Keep an eye on the logs… • Webserver • Apache error log • PHP error log • TYPO3 • Log module (Core error handler…) • Admin Panel • RealUrl • error log • are all paramters encoded? • Deprecation log • Reports module Fabrizio Branca
  • 34. Keep an eye on the logs… • External tools • Google Webmaster Tools • Wget • Piwik • MySQL • Slow query log • OS (*nix) • Syslog Fabrizio Branca
  • 36.
  • 38. Let tools do the analysis • PHP • TSFE • TypoScript • jQuery code • HTML • CSS • RSS Fabrizio Branca
  • 43. TypoScript Check (lint) Proof of concept! Xclassing tslib_content: function stdWrap($content,$conf) { $this->getLinkChecker()->check($conf, 'stdWrap'); return parent::stdWrap($content, $conf); } Fabrizio Branca
  • 44. Tick
  • 46. Tick
  • 47. Use validators Use validators for validating • HTML • CSS • RSS Keep an eye on editor„s content Fabrizio Branca
  • 48. Spot performance killers • Use USER_INTs only if really needed. • Create links with cHashes • Avoid putting USER_INTs on all pages (load them via ajax) • Cache headers • Static publishing Fabrizio Branca
  • 49. Monitoring • Configure your TYPO3 instances to notify you when errors occur. • Use Monitoring tools (e.g. Nagios, Caretaker?) Fabrizio Branca
  • 51. Maintainance • Delete old temp files find ../htdocs/typo3temp -type f -mtime +28 -delete • Delete deleted records • Delete unreferenced files • Cleanup/check database Fabrizio Branca