Practical tips to debug Liferay – further to my two earlier posts:
How to debug Liferay when nothing is printed in logs and there is a problem? – ChatGPT & BARD Generated | LinkedIn
How to debug Liferay? – Some pointers – Part 1 | LinkedIn
- Setup automated heap dumps when out of memory happens.
- Setup automated thread dumps when Liferay slows down.
- Set up Glowroot persistence.
- Set up Glowroot in central pattern in production especially.
- Use ycrash.io to analyze thread and heap dumps if possible or an offline tool as per your policy.
- Cannot emphasize enough on the above five.
- Check Liferay logs.
- Check DB connection pool settings via Hikari pool or others as set and it’s exhaustion.
- Check configuration files: setenv.sh/bat server.xml, osgi/configs, other app server configurations, etc.
- Check logs of Elasticsearch, Database, Webserver, Load balancer, Web application firewall, Content Delivery Network and more.
- Use CAT API of Elasticsearch to check status of Elasticsearch.
- Check if any schedulers or integrations are putting load on the system.
- Check if things like caching, content delivery, security, etc. are as much as possible offloaded from app server.
- Check network delays & errors across all component deployments and debug layer by layer for: LR, app nodes, WS, ES, DB, WAF, CDN and so on.
- Automate via scripting monitoring of CPU, threads and Heap especially on all servers in deployment.
- Analyze trends for traffic.
- Email me: Neil@HarwaniSytems.in
- Website: www.HarwaniSystems.in
- Blog: www.TechAndTrain.com/blog
- LinkedIn: Neil Harwani | LinkedIn
How to debug Liferay? Some pointers. – Part 1. Many a times, we only check at specific places and forget other areas while debugging. This small blog acts as a checklist to check and debug Liferay.
- Look at installing and using GLOWROOT
- Check the slow traces / web transactions / errors and the related graphs in GLOWROOT
- Check the logging levels module wise and overall
- Check all the Liferay nodes if in a cluster
- Check the app server logs
- Check JNDI & JDBC settings
- Check the things by simulating on default vanilla instance / bundle
- Use help center articles
- Check your webserver, load balancer and database configurations plus logs
- Check your portal & system properties
- Check configurations in control panel for the related work
- Check your custom API list
- Check details via GoGo shell commands
- Check the code in Liferay DevStudio or your favorite IDE
- Check marketplace apps that are installed
- Consider using Groovy scripting for debugging
- Check virtual instances if in use
- Check OSGI configurations if added
- Check your elastic search server status
- Check your heap size and thread dumps plus configurations in setenv.sh/bat
Blog also gives you an idea on the configurability and extent of Liferay modularity. It makes our work easier when many of the things are configurable.
References:
Ideas on Innovation around Software. We Thrive On Ideas. We are Learner Centered, Open Source & Digital Focused.