Jasper Ideas

[case 01780510] Limit PhantomJS threads by configuring FixedThreadPool executor

The background for this ER is customer's issue where their JRS spawns too many phantomjs processes on the OS during Dashboard export. These processes consume all the memory and make the server unusable until restart. At the time of measurement the number of such processes was about 220.

Upon discussing the issue with engineering

"_I'm not sure that we can prevent PhantomJS from having bugs, but we can limit concurrent execution of it._ __

_For dashboard export PhantomJS is controlled by Selenium WebDriver, which handles everything, including killing the process. All these interaction are inclosed in a Callable implementation, which then passed to an Executor. Currently we use CachedThreadPool executor which does not seem to have limit of concurrent executions. By replacing it with FixedThreadPool executor we should be able to limit number of concurrent executions. But this requires some code change and testing, it cannot be done by specifying some property unfortunately._"

This is a request to implement FixedThreadPool executor, and preferably make the limit configurable.

  • Stas Polivyanenko
  • Mar 31 2021
  • To be Reviewed
Components Dashboards
  • Attach files