Managing the Cache
You can improve the performance of opentaps by increasing the use of caching. Edit the file framework/base/config/cache.properties and increase the number of milliseconds various things are cached by the system. For example, you can increase the caching of the screens by using these settings:
minilang.SimpleMethodsDirect.expireTime=3600000 minilang.SimpleMethodsResource.expireTime=3600000 minilang.SimpleMethodsURL.expireTime=3600000 script.BshLocationParsedCache.expireTime=3600000 script.BshBsfParsedCache.expireTime=3600000 webapp.BsfEvents.expireTime=3600000 webapp.ControllerConfig.expireTime=3600000 widget.form.locationResource.expireTime=3600000 widget.form.webappResource.expireTime=3600000 widget.menu.classResource.expireTime=3600000 widget.menu.locationResource.expireTime=3600000 widget.menu.webappResource.expireTime=3600000 widget.screen.locationResource.expireTime=3600000 widget.screen.webappResource.expireTime=3600000 widget.tree.locationResource.expireTime=3600000 widget.tree.webappResource.expireTime=3600000 template.ftl.general.expireTime=3600000 template.ftl.location.expireTime=3600000
Server Hit Logging
Opentaps by default will log every user requests in a database for later analysis. If you have a lot of users, or a lot of visitors to your website, this will quickly cause the size of your database to grow. To turn off logging, edit the file framework/webapp/config/serverstats.properties and set the flags to false instead of true.
How to Disable Users
Set the UserLogin.enabled to "N" and make sure that the disabledDateTime is set to null. Otherwise, the user login will be re-enabled 15 minutes after the disabledDateTime.
How to change the default ID numbers
Edit the table SequenceValueItem and change the seqId for the table you want. For example, if you want to set all your productIds to begin with "8000000" instead of "10000", just create a row for "Product" with seqId = 8000000
JobSandbox and the Job Scheduler
Asynchronous jobs are scheduled with the ofbiz job scheduler. You should periodically check your job sandbox table to make sure that there are no duplicated jobs which are pending, and delete old jobs from this table so that it does not get too big and become a drag on performance. Here are some queries you can use from Web Tools > Entity SQL Processor or your favorite database query tool:
SELECT STATUS_ID, COUNT(JOB_ID) FROM JOB_SANDBOX GROUP BY STATUS_ID
checks the number of jobs in the table by status.
DELETE FROM JOB_SANDBOX WHERE STATUS_ID = 'SERVICE_FINISHED' DELETE FROM JOB_SANDBOX WHERE STATUS_ID = 'SERVICE_FAILED'
deletes jobs which are finished or failed. These do not need to be saved in the database and can be deleted to conserve space in the table.
SELECT * FROM JOB_SANDBOX WHERE STATUS_ID = 'SERVICE_RUNNING'
checks which jobs are in the "running" state. Sometimes jobs which have stopped running could still be in this state in the JobSandbox table as a result of a server restart for example. You should delete these entries as well.
SELECT * FROM JOB_SANDBOX WHERE STATUS_ID = 'SERVICE_PENDING'
checks which jobs are in the "pending" state. You should periodically check that there are no duplicate services scheduled to run, and delete the duplicate pending entries.