-
Notifications
You must be signed in to change notification settings - Fork 62
Admin: System Configuration
You can customize how your nimbits instance behaves by editing the file: application.properties
If you installed nimbits with our install script with the default options (tomcat etc) the file is located
/opt/tomcat/webapps/nimbits/WEB-INF/classes/application.properties after installation. This file may be over-written on upgrades so it's a good idea to back it up and replace it after upgrades and then restart your web server.
example:
$vi /opt/tomcat/webapps/nimbits/WEB-INF/classes/application.properties
$sudo service tomcat8 restart
In this file, you can change:
- Database Connections and drivers
- Outbound email smtp connections
- Enable or Disable the Register New User button on login to the web portal
- Configure background tasks - see below
Nimbits Server has a heartbeat task that runs in the background on the server and does various work including:
- Processing idle alerts, statistics, and timed events
- Deleting expired data
In a Load Balanced / High Availability Environment you may have many instances of Nimbits running and they can share the work between them. The instances will shard the pending work, marking chunks of work that it is working on so other instances won't process them and then marking them as complete.
Work that is processed is marked with a current timestamp, and work is picked up based on the oldest timestamps, so it is more likely that work will be done in a timely manner and work that takes a long time to complete won't block other tasks.
Based on your use cases, you may edit these properties:
system.task.idle.enabled=true
system.task.idle.initialDelay=1000
system.task.idle.fixedRate=5000
system.task.idle.limit=1000
This tells the instance to
- Process idle alert subscriptions
- Start processing after a delay of 1 second
- Look for idle alerts to process every 5 seconds
- Process 1000 idle alerts at a time.
In a load balanced environment, each instance will split the work up so alerts are processed in a timely manner.
When making asynchronous calls to the API, data is processed in a new background thread. You can tune your system to avoid maxing out resources by editing this file:
nimbits_server/src/main/webapp/WEB-INF/applicationContext.xml
<bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="5" />
<property name="maxPoolSize" value="1000" />
<property name="queueCapacity" value="250" />
</bean>
This will change how your system handels task pools. For more information about Task Pooling see:
Copyright 2016 Benjamin Sautner
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.