{"id":2224,"date":"2018-04-28T21:50:49","date_gmt":"2018-04-29T01:50:49","guid":{"rendered":"https:\/\/www.danielpradilla.info\/blog\/?p=2224"},"modified":"2018-04-28T21:53:03","modified_gmt":"2018-04-29T01:53:03","slug":"pentaho-is-slow-for-servers-with-too-many-home-directories","status":"publish","type":"post","link":"https:\/\/www.danielpradilla.info\/blog\/pentaho-is-slow-for-servers-with-too-many-home-directories\/","title":{"rendered":"Pentaho is slow for servers with too many home directories"},"content":{"rendered":"<p>Over the course of two years, browsing solutions on our Pentaho 5.4 server became progressively slow. It came to a point in which you had to wait 2-3 minutes to see the list of solutions in the Pentaho User Console.<\/p>\n<p>The catalina log didn&#8217;t say much and we didn&#8217;t have too many solutions (around 200), so I though it was perhaps a database bottleneck. It all came to a screeching halt on a Friday afternoon (as usual) when, after a restart, the Pentaho Console simply stopped responding.<\/p>\n<p>I turned all logging on and found that Pentaho was complaining about a lot of invalid users. Googling around I found that 5.4 performs user permissions tests on first login, calling <code>UserDetailService<\/code> for each home directory owner in the Home directory. Examining logs, we had over 4000 folders in there, accumulated from two authentication scheme changes. I could not even open the Home folder in the user console.<\/p>\n<p>Pentaho versions 6.1 and over have a config flag to skip this user verification. It&#8217;s called <code>skipUserVerificationOnPrincipalCreation<\/code>, inside <code>pentaho-solutions\/system\/jackrabbit\/security.properties<\/code><\/p>\n<p>More info at <a href=\"https:\/\/help.pentaho.com\/Documentation\/6.1\/0P0\/100\/Jackrabbit_Repository_Performance_Tuning\">Jackrabbit Repository Performance Tuning<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>All fine and dandy, but what to do with a Pentaho 5.4 server. Or even, how to fix this after your PUC becomes unresponsive?<\/p>\n<p>I thought that the <a href=\"https:\/\/help.pentaho.com\/Documentation\/8.0\/Developer_Center\/REST_API\">Pentaho REST API<\/a> might help and, sure enough, we can delete folders with it. In our case, our users don&#8217;t save anything in their home folders, so all we needed to do was to delete these 4000+ folders.<\/p>\n<p><strong>This is a nuclear option, so don&#8217;t run this unless you know what you are doing. If your users have solutions saved in their home folders, you need to amplify the following script to check for that and back up the solution and\/or avoid deletion.<\/strong><\/p>\n<p>Open up any browser javascript console, replace &lt;server_url&gt; by your pentaho url and run:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n$.getJSON(&quot;http:\/\/&lt;server_url&gt;:8080\/pentaho\/api\/repo\/files\/:home\/children&quot;, function(data){\r\n    $.each(data, function(i, nodes){\r\n        nodes.forEach(function(node){\r\n            console.log(node.path,node.id);\r\n            jQuery.ajax({\r\n                async:false,\r\n                type: &quot;PUT&quot;,\r\n                url: &quot;http:\/\/&lt;server_url&gt;:8080\/pentaho\/api\/repo\/files\/deletepermanent&quot;,\r\n                data: node.id\r\n            });\r\n        })\r\n    })\r\n});\r\n<\/pre>\n<p>You can fork the gist for this at\u00a0<a href=\"https:\/\/gist.github.com\/danielpradilla\/72a603a5d0de71771e0b5836bde05479\">https:\/\/gist.github.com\/danielpradilla\/72a603a5d0de71771e0b5836bde05479<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the course of two years, browsing solutions on our Pentaho 5.4 server became progressively slow. It came to a point in which you had to wait 2-3 minutes to see the list of solutions in the Pentaho User Console. The catalina log didn&#8217;t say much and we didn&#8217;t have too many solutions (around 200),&hellip; <a class=\"more-link\" href=\"https:\/\/www.danielpradilla.info\/blog\/pentaho-is-slow-for-servers-with-too-many-home-directories\/\">Continue reading <span class=\"screen-reader-text\">Pentaho is slow for servers with too many home directories<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[331],"tags":[345],"class_list":["post-2224","post","type-post","status-publish","format-standard","hentry","category-software-development-en-en","tag-pentaho","entry"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1tlzy-zS","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2174,"url":"https:\/\/www.danielpradilla.info\/blog\/how-to-connect-pentaho-data-integration-to-sap-hana\/","url_meta":{"origin":2224,"position":0},"title":"How to Connect Pentaho Data Integration to SAP HANA","author":"Daniel Pradilla","date":"22\/06\/2016","format":false,"excerpt":"Recently I had to connect Pentaho Data Integration to SAP HANA and I made some notes along the way: The first step is to get the SAP HANA JDBC driver, a file called ngdbc.jar. The quickest way is to\u00a0download and install the SAP HANA client from the SAP Software Download\u2026","rel":"","context":"In &quot;Software Dev.&quot;","block_context":{"text":"Software Dev.","link":"https:\/\/www.danielpradilla.info\/blog\/category\/software-development-en-en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2016\/06\/pentaho-saphana.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2016\/06\/pentaho-saphana.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2016\/06\/pentaho-saphana.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1987,"url":"https:\/\/www.danielpradilla.info\/blog\/short-guide-to-pentaho-data-integration\/","url_meta":{"origin":2224,"position":1},"title":"A short and sweet introduction to Pentaho Data Integration","author":"Daniel Pradilla","date":"16\/08\/2013","format":false,"excerpt":"Whenever I have to create or maintain a Pentaho Data Integration scheduled job I have to go back to the Pentaho wiki or google for use cases. Although I should, I never remember the specifics and going through 2007 forum posts and outdated documentation is always a pain. Recently, I\u2026","rel":"","context":"In &quot;Project Mgmt.&quot;","block_context":{"text":"Project Mgmt.","link":"https:\/\/www.danielpradilla.info\/blog\/category\/projectmanagement-en\/"},"img":{"alt_text":"6906OT_Instant Pentaho Data Integration Kitchen","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2013\/08\/6906OT_Instant-Pentaho-Data-Integration-Kitchen.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1984,"url":"https:\/\/www.danielpradilla.info\/blog\/una-breve-guia-de-pentaho-data-integration\/","url_meta":{"origin":2224,"position":2},"title":"Una breve gu\u00c3\u00ada de Pentaho Data Integration","author":"Daniel Pradilla","date":"16\/08\/2013","format":false,"excerpt":"Cada vez que tengo que mantener un job de Pentaho Data Integration, tengo que volver al wiki de Pentaho o buscar en google algunos casos de uso. Aunque deber\u00c3\u00ada, nunca recuerdo los detalles espec\u00c3\u00adficos y buscar entre posts de 2007 y documentaci\u00c3\u00b3n a\u00c3\u00b1eja, es siempre doloroso. Hace poco, me tropec\u00c3\u00a9\u2026","rel":"","context":"In &quot;Control de Proyectos&quot;","block_context":{"text":"Control de Proyectos","link":"https:\/\/www.danielpradilla.info\/blog\/category\/controldeproyectos\/"},"img":{"alt_text":"6906OT_Instant Pentaho Data Integration Kitchen","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2013\/08\/6906OT_Instant-Pentaho-Data-Integration-Kitchen.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2302,"url":"https:\/\/www.danielpradilla.info\/blog\/aws-lambda-python\/","url_meta":{"origin":2224,"position":3},"title":"10 things I learned while deploying my first python function to AWS Lambda","author":"Daniel Pradilla","date":"04\/01\/2019","format":false,"excerpt":"I spent a few days on and off trying to deploy a Flask REST service to AWS Lambda, just to experience what the cool kids were talking about. These are some of the things I learned along the way: \u00a0 Zappa is the easiest packager\/deployer for python (as of December\u2026","rel":"","context":"In &quot;Software Dev.&quot;","block_context":{"text":"Software Dev.","link":"https:\/\/www.danielpradilla.info\/blog\/category\/software-development-en-en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2019\/01\/AWS-Lambda-290x300.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2188,"url":"https:\/\/www.danielpradilla.info\/blog\/music-organizer\/","url_meta":{"origin":2224,"position":4},"title":"How to tidy up and organize music on your PC o Mac","author":"Daniel Pradilla","date":"15\/01\/2017","format":false,"excerpt":"Do you have a lot of Untitled \/ Without Artist \/ Without Album songs? All music players allow you to sort and catalog the songs, as long as you know the titles and names of the artists. But what happens when many of your songs are unidentified? There are some\u2026","rel":"","context":"In &quot;Best of&quot;","block_context":{"text":"Best of","link":"https:\/\/www.danielpradilla.info\/blog\/category\/bestof\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/12\/5ba5dae0b26bd3abce9915c97316b518.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/12\/5ba5dae0b26bd3abce9915c97316b518.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/12\/5ba5dae0b26bd3abce9915c97316b518.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2012\/12\/5ba5dae0b26bd3abce9915c97316b518.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2234,"url":"https:\/\/www.danielpradilla.info\/blog\/how-to-build-an-api-for-sap-hana-using-strongloop-loopback\/","url_meta":{"origin":2224,"position":5},"title":"How to build an API for SAP HANA using strongloop\/loopback","author":"Daniel Pradilla","date":"30\/05\/2018","format":false,"excerpt":"One of the aspects I like the most about SAP HANA is the cloud app development environment that allows you to quickly put together a data-entry app using Fiori. Recently, I wanted to build a small JavaScript app for data querying and entry using the awesome ag-grid. The data was\u2026","rel":"","context":"In &quot;Software Dev.&quot;","block_context":{"text":"Software Dev.","link":"https:\/\/www.danielpradilla.info\/blog\/category\/software-development-en-en\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2018\/05\/loopback-arc.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2018\/05\/loopback-arc.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2018\/05\/loopback-arc.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.danielpradilla.info\/blog\/wp-content\/uploads\/2018\/05\/loopback-arc.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/posts\/2224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/comments?post=2224"}],"version-history":[{"count":0,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/posts\/2224\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/media?parent=2224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/categories?post=2224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.danielpradilla.info\/blog\/wp-json\/wp\/v2\/tags?post=2224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}