How to enable logging of long lived threads and data engine queries
book
Article ID: KB0079736
calendar_today
Updated On:
Products
Versions
Spotfire Server
7.5 and higher
Description
This has helped to find memory leaks related to Python scripts and provide information regarding memory related issues.
Items will be logged if they have been alive for more than 50 seconds (with settings example below). For most jobs, this is never the case. The logging will contain the call stack for the creation to show what kind if job it is. The percentage value is added because the logging uses some resources, so it is possible to decide that only 10% (by random) of the items should be logged, resulting in much less of a performance penalty than 100%.
LogLiveQueriesOnlyOnce and LogLiveWorkItemsOnlyOnce can be used to avoid logging the same item over and over again if it lives for very long time.
IMPORTANT: The setting should be completely disabled by default and nothing should be visible in the config files. This is important because of the performance penalty caused by the additional logging. Only implement this change if instructed to do so by TIBCO Support for investigation purposes and revert the changes when the testing is complete.
Issue/Introduction
How to enable logging of long lived threads and data engine queries to see "Live WorkItems" and "# open documents" values.
Resolution
1). Open a command-line interface on the TIBCO Spotfire Server and export the service configuration by using the export-service-config command. Specify the Web Player capability and the deployment area:
By default, the output files are located in the <install dir>\tomcat\bin\config\root directory if you do not specify a source directory.
2). Create a back up of the Spotfire.Dxp.Worker.Host.exe.config file.
3). Open the Spotfire.Dxp.Worker.Host.exe.config file in a text or XML editor.
4). Add the following in the "</Spotfire.Dxp.Data.Properties.Settings>" and <Spotfire.Dxp.Framework.Properties.Settings> sections. If the Settings section is not present, add it.
Verify that the following line is present in <sectionGroup>: <section name="Spotfire.Dxp.Data.Cxx.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
5). Save.
6). Create a back up of the log4net.config file.
7). Open the log4net.config in a text or XML editor.
8). Add a log4net appender for the WebLiveJobsLog and add following. This can be done at the bottom file prior to </log4net> .
10). In the command-line interface, import the configuration file back into Spotfire Server and name the configuration by using the import-service-config command.
11). Assign the created configuration to your service.
Option 1: In the command-line interface, assign the created Spotfire Web Player configuration to the Spotfire Server to make it possible to use for the service: set-service-config --service-id=value --config-name=WebPlayerConfiguration
Option 2: In the Spotfire Server web interface: - Nodes & Services > Nodes > Select your service on the left > Click Edit - In the "Edit service" dialog, select your imported configuration in the "Configuration" dropdown - Click Update (Note: This will trigger a restart of the instances).
Additional Information
Doc: Manually editing the service configuration files