Developer forum

Forum » Dynamicweb 10 » Log Retention Advice

Log Retention Advice

Ferri Halfhide
Reply

Hi Team,

We have seen this functionality, but we are still wondering about a few things:Log retention

  • Is this something that should be implemented (by default)?

  • If so, what are the recommended values?

  • From a performance point of view, is this recommended or considered best practice?

The main driver for this question is performance, so it is important for us to understand whether this functionality will have a meaningful impact.

 


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Ferri

Yes — log retention should be enabled in almost every environment and is considered a best-practice operational setting in Dynamicweb 10.

Why it exists: logs (both files and database events) accumulate continuously. Over time this can lead to very large log tables and files, which increases backup sizes, slows queries and indexes, consumes disk space, and masks real issues with noise. Log retention prevents unbounded growth and keeps the system stable and performant long-term.

Should it be implemented by default?
Yes. Enabling automatic log deletion with sensible retention thresholds is recommended on go-live for any production solution. This gives you a predictable baseline for operational noise and storage usage. Periods that are far too long (months or years) don’t deliver meaningful diagnostic value and can degrade performance indirectly.

Recommended values (guideline, not strict rules):

  • Low-traffic / smaller solutions: 14–30 days (files) and 14 days (DB)

  • Typical B2B sites: 7–14 days (files) and 7–14 days (DB)

  • High-traffic / integration-heavy systems: 3–7 days (files and DB)

Shorter retention encourages focusing on recent, relevant log data while keeping overhead low. Longer histories can be exported to external log systems if compliance requires it.

Performance impact:
Log retention itself doesn’t reduce the cost of generating logs, but it prevents logs from becoming a performance problem over time. Large event tables and oversized log files can slow administrative tools, increase I/O, and inflate backups — all of which can meaningfully impact operations in higher-load environments.

Pairing log retention with good use of the Event Viewer and Health checks creates a healthier system overall:

  • The Event Viewer highlights repeating errors and warnings — that’s where you should investigate and fix issues so logging itself becomes quieter.

  • Log files, referenced from Event Viewer, give you the details for root cause analysis.

  • Health checks surface structural data problems that often cause noise in logs, such as orphaned relations or broken references.

Log retention is safety infrastructure — it keeps log data from overwhelming your system — but real performance and stability improvements come from fixing the underlying causes of excessive logs or errors.

Votes for this answer: 1

 

You must be logged in to post in the forum