Common configurations

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.4
  • Enterprise
  • Community
  • Planned

Sense/Net ECM is a complex web application that has many configurable features. We try to keep the number of entries in configuration files in the file system at minimum, but still, we have plenty of them. This article lists the most common values that you may want to change in your application. The keys and values below apply not only to the web.config but to all configuration files that belong to built-in command line tools like Export or [[Import]. For an overview about software and hardware requirements and general configuration advices please visit the following article:

Please note that some features rely on Settings instead of a configuration. Please visit that article for the differences.

Data handling

It is possible to control the size of cached binaries or uploaded chunks. The optimal values depend on the environment - number and capacity of web servers or capabilities of the network. The values here can be found and changed under the sensenet/dataHandling section of the web.config.

<add key="BinaryBufferSize" value="1048576" />
<add key="BinaryChunkSize" value="1048576" />
<add key="BinaryCacheSize" value="1048576" />

Binary buffer size

When serving files from the database or the file system, our stream implementation caches part of the stream in an in-memory buffer to serve requests faster and to reduce the number of SQL connections. This configuration value determines the size (in bytes) of this binary buffer.

Binary chunk size

Size of chunks in bytes that are sent to the server by the upload client code. A smaller number means shorter and faster requests but the number of upload requests will be higher obviously.

Binary cache size

Determines the maximum file size (in bytes) that should be cached after loading their binary value. Smaller files will by placed into the cache, larger files will always be served from the database directly.

Timeout values

The values here can be found and changed under the appSettings section of the config file.

<add key="SqlCommandTimeout" value="120" />
<add key="TransactionTimeout" value="60" />
<add key="LongTransactionTimeout" value="60" />
<add key="LuceneActivityTimeoutInSeconds" value="60" />
<add key="IndexLockFileWaitForRemovedTimeout" value="60" />
<add key="LuceneLockDeleteRetryInterval" value="60" />
<add key="TextExtractTimeout" value="60" />

In case you are working with a huge content repository (>100GB) it is fine if you raise these values high above the average. In case of the SnAdminRuntime tool for example (that is responsible for executing upgrade packages) you can even set SQL command timeout to 0 (meaning infinite).

Sql command timeout

Determines the usual command timeout for every SQL command initiated through our SQL database provider. Default value is 30 seconds.

Transaction timeout

To prevent the system from draining out resources, we need to limit the execution time of transactions (in Sense/Net ECM this includes not only database transactions but 'logical' transactions too). If the time frame passes, we have to roll back the transaction and log the error.

Long transaction timeout

There is one use case when the usual transaction timeout may be too short: when copying a huge stream into a file stream. In this exceptional case we use a different value, determined by the LongTransactionTimeout configuration.

Lucene activity timeout

Determines how long Lucene activities may execute. It is very important to know that the 'timer' starts when the activity is placed into the activity queue, not when it starts to execute! This means if there are many activities in the queue (therefore they have to wait for previous ones to complete), you may need to increase this timeout value. The default is 30 seconds.

Index lockfile wait for removed timeout

Before the content repository starts or shuts down, we wait for some time for the Lucene engine to 'release' the index (meaning delete the lock file from the file system). This timeout value determines the length of this waiting period. If the time frame passes and the file is still there, nothing actualy happens - we simply log this failure and (in case of startup) we send a notification email to operators. Default value is 60 seconds.

Lucene lock delete retry interval

When the repository is starting but the Lucene index writer lock file is still present in the index directory in the file system (for example because a previous process ended unexpectedly), we will try to delete that file forcefully. This configuration value determines how much time the system has (in seconds) to delete that file. If another process truly locks the index file, than the repository will not start. Default is 60 seconds.

Text extract timeout

We index documents (e.g. Office files) by extracting the text stored inside their binary (see the Text extractors article for details). This configuration value determines how much time this extraction process can take (in seconds). Default is 60 seconds.

Limits

The values here can be found and changed under the appSettings section of the config file.

<add key="LuceneActivityQueueMaxLength" value="500" />

LuceneActivityQueueMaxLength

Determines how many activities can be kept in the indexing queue at the same time. When this limit is reached, we will stop creating new activities (by blocking save operations) until the system reduces the length of the queue.

Related links

References

There are no external references for this article.