The error message “wazuh-modulesd: ERROR: Database error: Oversized frame” is one of the more serious database communication issues that can occur within a Wazuh deployment.
In many cases, it is immediately followed by a second critical message indicating that a worker thread has crashed:
wazuh-modulesd: ERROR: Database error: Oversized frame.
wazuh-modulesd: CRITICAL: Worker thread crashed.When this occurs, one or more Wazuh modules can lose access to the internal database layer, causing data collection, vulnerability scanning, inventory synchronization, or other security monitoring functions to stop working correctly.
An oversized frame error generally indicates that a component attempted to send or process a database message that exceeded the maximum size expected by the Wazuh database communication layer.
Since Wazuh relies heavily on internal message passing between services, malformed or unexpectedly large frames can cause worker threads to terminate to protect the system from corruption or memory-related issues.
Similar database corruption and communication failures have been reported in the Wazuh community when processing malformed data, corrupted vulnerability databases, or unexpected payloads.
Administrators commonly observe symptoms such as:
- Sudden crashes of
wazuh-modulesd - Vulnerability detection failures
- Missing inventory updates
- Interrupted agent communication
- Repeated database-related errors in
ossec.log - High CPU usage caused by repeated restart attempts
- Modules entering continuous failure loops
Because Wazuh serves as a centralized security monitoring platform, unresolved worker thread crashes can result in blind spots across your environment.
Security events may stop being processed, vulnerability data may become stale, and compliance monitoring can become unreliable.
The longer the issue persists, the greater the risk of missing critical alerts or indicators of compromise.
For additional Wazuh troubleshooting guidance, see:
Wazuh Vulnerability Detection Not Working? Here’s How to Fix It
Why Is Wazuh Using High CPU? Troubleshooting Guide
Understanding the Wazuh Architecture Behind the Error
What Is wazuh-modulesd?
wazuh-modulesd is one of the core daemons within the Wazuh manager.
It hosts and manages several Wazuh modules responsible for advanced monitoring and enrichment functions.
These modules include:
- Vulnerability Detection
- Syscollector
- AWS integrations
- Azure integrations
- VirusTotal integrations
- Container monitoring
- Cloud monitoring modules
The daemon acts as an execution framework that allows these modules to collect, process, and exchange information with other Wazuh components.
Role of wazuh-modulesd in Wazuh
The primary responsibility of wazuh-modulesd is coordinating module operations and forwarding collected data to the appropriate processing components.
For example:
- Syscollector gathers software inventory information from endpoints.
- Vulnerability Detection correlates installed software against vulnerability feeds.
- Cloud modules retrieve logs and security events from cloud providers.
Many of these functions require direct interaction with the Wazuh database service.
Interaction with wazuh-db
wazuh-modulesd does not directly store most information itself.
Instead, it communicates with wazuh-db, which serves as Wazuh’s database abstraction layer. When modules need to retrieve or update information, requests are sent through internal sockets to the database service.
This architecture provides:
- Centralized data management
- Better concurrency handling
- Reduced resource contention
- Improved scalability
However, it also means that communication failures between modules and the database service can disrupt multiple Wazuh features simultaneously.
How Modules Communicate with the Database Layer
Communication between Wazuh services typically occurs through:
- UNIX sockets
- Internal message queues
- Structured database frames
- Inter-process communication (IPC) channels
Each request is packaged into a frame before being transmitted to wazuh-db.
If a frame becomes corrupted, malformed, or excessively large, the receiving service may reject it and terminate the worker thread handling the request.
What Is wazuh-db?
wazuh-db is the database daemon responsible for storing and retrieving operational data used by the Wazuh manager.
It provides a centralized interface that other daemons use to access information without interacting directly with underlying database files.
Purpose of the Wazuh Database Service
The service manages:
- Agent metadata
- Syscollector inventories
- Vulnerability data
- File integrity information
- Configuration records
- Internal state information
By centralizing database operations, Wazuh improves performance and reduces the complexity of individual modules.
Agent and Manager Data Storage Functions
The database service handles data generated by:
- Endpoint agents
- Security monitoring modules
- Vulnerability scanners
- Inventory collection systems
- Manager-side services
Thousands of agents may simultaneously generate requests that are processed through wazuh-db.
Internal Communication Mechanisms
Internally, Wazuh relies on:
- Socket-based communications
- Request-response messaging
- Serialized frame structures
- Thread pools for concurrent processing
This architecture enables high-performance processing but requires strict validation of message sizes and formats.
How Worker Threads Process Database Frames
Worker threads are responsible for processing incoming requests and responses exchanged between Wazuh components.
Rather than using a single execution thread, Wazuh distributes work across multiple worker threads to improve scalability and throughput.
Frame-Based Communication in Wazuh
A frame is a structured block of data containing:
- Message headers
- Metadata
- Request parameters
- Payload data
Every database request and response is transmitted as one or more frames.
The receiving process validates each frame before processing it.
Thread Handling and Message Queues
The general workflow is:
- Module generates a database request.
- Request enters a message queue.
- Worker thread retrieves the request.
- Frame validation occurs.
- Request is processed.
- Response is returned.
This model allows Wazuh to efficiently handle large numbers of simultaneous operations.
Normal Frame Size Expectations
Wazuh expects frames to remain within predefined size limits.
These limits exist to:
- Prevent memory exhaustion
- Detect malformed requests
- Avoid buffer overflows
- Improve stability under heavy workloads
If a frame exceeds the allowed threshold, the receiving process treats it as potentially unsafe and generates an oversized frame error rather than attempting to process it.
A similar defensive approach is common across security software because oversized payloads are often associated with corruption, malformed input, or software defects.
For example, buffer handling vulnerabilities have historically resulted in denial-of-service and stability issues across many security platforms.
Understanding the “Database Error Oversized Frame” Message
Example Error Log
Administrators typically encounter entries similar to the following:
wazuh-modulesd: ERROR: Database error: Oversized frame.
wazuh-modulesd: CRITICAL: Worker thread crashed.Additional errors may appear before or after the crash depending on the affected module.
Examples can include:
wazuh-modulesd: ERROR: Unable to connect to socket 'queue/db/wdb'
wazuh-remoted: INFO: Cannot connect to 'queue/db/wdb'These follow-on errors occur because the worker thread handling database communication has terminated, leaving other components unable to communicate with wazuh-db.
What an Oversized Frame Means
An oversized frame error indicates that a message sent between Wazuh components exceeded the maximum size accepted by the communication protocol.
The receiving component detects the abnormal frame and rejects it.
Definition of a Frame in Wazuh Communications
Within Wazuh’s internal architecture, a frame represents a serialized message exchanged between processes.
A frame generally contains:
- Header information
- Message type
- Payload length
- Data payload
Before processing begins, Wazuh validates the frame structure and declared size.
Why Frame Size Limits Exist
Frame size limits are essential for maintaining system stability.
Without size restrictions, a malformed request could:
- Exhaust available memory
- Cause buffer overflows
- Crash critical daemons
- Trigger denial-of-service conditions
The validation process helps prevent these outcomes.
Protection Against Malformed or Unexpected Data
Oversized frame detection acts as a safety mechanism.
Rather than attempting to process suspicious data, Wazuh immediately rejects the request and logs an error.
This behavior reduces the likelihood of database corruption and protects the integrity of the manager.
Security software commonly employs similar validation mechanisms to guard against malformed input and memory-related vulnerabilities.
Why Worker Threads Crash After the Error
When an oversized frame is detected, the associated worker thread may terminate intentionally or crash after encountering an unrecoverable parsing failure.
Memory Protection Mechanisms
Modern software systems often terminate processing when invalid memory operations are detected.
This prevents:
- Memory corruption
- Data inconsistency
- Undefined application behavior
In Wazuh, worker thread termination is frequently a protective response designed to maintain service integrity.
Failed Frame Parsing
Before a request can be processed, the worker thread must parse the incoming frame.
If:
- The frame length is invalid
- The payload exceeds configured limits
- The structure is corrupted
the parser may abort processing and generate the oversized frame error.
Database Communication Interruption
Once the worker thread exits, communication between wazuh-modulesd and wazuh-db can become partially or completely unavailable.
This often leads to secondary symptoms such as:
- Vulnerability scanning failures
- Missing inventory updates
- Database connection errors
- Module instability
- Service restart loops
Administrators should therefore treat worker thread crashes as a high-priority issue and begin troubleshooting immediately to restore normal monitoring operations.
Related Guides:
How to Fix “Wazuh Dashboard Server Is Not Ready Yet” (Step-by-Step)
Fixing Wazuh 502 Bad Gateway: Troubleshooting Guide
Common Causes of Oversized Frame Errors
Understanding the root cause is critical because the oversized frame error is usually a symptom rather than the actual problem.
In most cases, some component is generating data that exceeds what wazuh-db expects to receive, causing the worker thread to terminate.
Corrupted Wazuh Database Files
Database corruption is one of the most common causes of oversized frame errors.
When database files become corrupted, Wazuh may incorrectly interpret stored records, resulting in malformed database frames being generated during read or write operations.
Database Corruption Scenarios
Database corruption can occur due to:
- Unexpected system crashes
- Power failures
- Filesystem corruption
- Storage hardware issues
- Interrupted database updates
Corrupted records may contain invalid metadata or incorrect size values that trigger oversized frame detection.
Abrupt Shutdowns
If the Wazuh manager is terminated unexpectedly during database operations, partially written records can remain in the database.
Examples include:
- Forced server reboots
- Power outages
- Manual process termination (
kill -9) - Virtual machine crashes
These situations increase the likelihood of database inconsistencies.
Disk-Related Issues
Storage problems can also corrupt database contents.
Common examples include:
- Bad sectors
- Failing SSDs
- Filesystem corruption
- Full disk partitions
- I/O errors
Administrators should always verify disk health when investigating database-related crashes.
Related Guide:
Why Is Wazuh Using High CPU? Troubleshooting Guide
Excessively Large Agent Data
Certain Wazuh modules generate large datasets that are stored and processed through wazuh-db.
When these datasets become unusually large, frame size limits may be exceeded.
Oversized Inventory Records
The Syscollector module gathers detailed endpoint inventory information, including:
- Installed software
- Running processes
- Network interfaces
- Hardware details
Servers containing thousands of software packages or extensive inventories may generate exceptionally large records.
Vulnerability Scan Data
The Vulnerability Detector module can process large vulnerability feeds and correlate them against extensive software inventories.
Potential issues arise when:
- Software inventories are unusually large
- Vulnerability databases become corrupted
- Feed synchronization fails
- Metadata contains malformed entries
This is one reason vulnerability-related modules are often implicated when oversized frame errors occur.
Large FIM Events
File Integrity Monitoring (FIM) can also contribute to oversized frames.
Examples include:
- Monitoring directories with huge files
- Tracking large configuration repositories
- Processing extensive file metadata
- Generating large change records
Excessive FIM data can overwhelm database communication channels.
How to Configure File Integrity Monitoring (FIM) in Wazuh
Malformed Agent Messages
Sometimes the problem originates directly from an endpoint agent.
Instead of sending valid structured data, the agent transmits malformed payloads that cannot be properly processed.
Broken Agent Communication
Communication issues can occur because of:
- Network interruptions
- Corrupted packets
- Agent software defects
- Incomplete transmissions
The resulting payload may no longer conform to the format expected by the manager.
Corrupted Event Payloads
Certain events may contain:
- Invalid JSON
- Unexpected binary data
- Corrupted strings
- Truncated records
When these events reach wazuh-db, frame validation may fail.
Unsupported Formats
Custom log sources occasionally introduce unsupported data formats.
Examples include:
- Non-standard JSON structures
- Improper XML formatting
- Binary application logs
- Unsupported character encodings
These payloads can lead to abnormal frame construction and worker thread failures.
Version Mismatch Between Components
Running different versions of Wazuh components can create protocol incompatibilities.
These incompatibilities may result in one component generating frames that another component cannot interpret correctly.
Agent-Manager Incompatibilities
Problems frequently occur when:
- Agents are significantly older than the manager
- Managers are upgraded before agents
- Protocol changes are introduced between versions
In these situations, unexpected message structures can trigger oversized frame errors.
Mixed-Version Clusters
Cluster environments require version consistency.
Issues may arise when:
- Worker nodes use different versions
- Cluster nodes are partially upgraded
- Synchronization formats differ between releases
Mixed-version clusters are a known source of unusual database communication behavior.
Upgrade-Related Issues
Upgrade procedures occasionally leave behind:
- Outdated databases
- Legacy configuration files
- Unsupported module settings
- Stale synchronization data
These remnants can interfere with normal operation after an upgrade.
Defective Custom Integrations
Organizations often extend Wazuh through custom integrations and automation.
While powerful, custom code can inadvertently generate invalid database requests.
External Scripts Generating Invalid Data
Custom scripts may produce:
- Excessively large JSON documents
- Improperly formatted events
- Recursive data structures
- Unexpected payload sizes
Without proper validation, these payloads can exceed Wazuh’s communication limits.
API-Based Ingestion Problems
API integrations sometimes create oversized frames when:
- Bulk records are submitted at once
- Pagination is not implemented
- Payload validation is missing
- Third-party systems return malformed responses
Careful input validation is essential for all API integrations.
Custom Modules Exceeding Limits
Internally developed modules may not enforce the same safeguards used by official Wazuh components.
As a result, they can generate requests that exceed expected frame sizes and destabilize worker threads.
Cluster Synchronization Problems
In clustered deployments, synchronization traffic between manager nodes can also trigger oversized frame errors.
Large Synchronization Payloads
Synchronization processes may transfer:
- Agent metadata
- Configuration updates
- Vulnerability databases
- Internal state information
If these payloads become excessively large, synchronization frames may exceed allowable limits.
Corrupted Cluster Communications
Network issues between nodes can corrupt synchronization traffic.
Possible causes include:
- Packet loss
- Network instability
- Misconfigured firewalls
- Interrupted synchronization sessions
Corrupted synchronization frames can trigger worker thread crashes during processing.
Manager Node Inconsistencies
Cluster nodes should maintain consistent:
- Configurations
- Software versions
- Database schemas
- Synchronization settings
Inconsistencies between nodes can cause malformed synchronization data and oversized frame errors.
Wazuh Cluster Documentation: https://documentation.wazuh.com/current/user-manual/wazuh-server-cluster/
Initial Diagnostic Steps
Before applying fixes, administrators should gather evidence to identify the specific component generating oversized frames.
Skipping diagnostics often leads to temporary fixes while the underlying problem remains unresolved.
Review Wazuh Manager Logs
The first step is examining the manager logs.
sudo tail -f /var/ossec/logs/ossec.logFor historical analysis, use:
grep -i "oversized frame" /var/ossec/logs/ossec.logor
grep -i "worker thread crashed" /var/ossec/logs/ossec.logWhat to Look For
Pay particular attention to:
- Oversized frame entries
- Worker thread crash messages
- Database-related warnings
- Module initialization failures
- Vulnerability detector errors
- Cluster synchronization issues
Often, the log entries immediately preceding the crash reveal the actual source of the problem.
Identify the Affected Component
The next step is determining which module generated the oversized frame.
This dramatically narrows the troubleshooting scope.
Determine Whether the Problem Originates From
Look for references to:
- Vulnerability Detector
- Syscollector
- File Integrity Monitoring (FIM)
- Cluster synchronization
- AWS integrations
- VirusTotal integrations
- Custom integrations
- Third-party scripts
For example:
wazuh-modulesd:vulnerability-detectormay indicate that vulnerability scanning triggered the issue.
Similarly:
wazuh-modulesd:syscollectorpoints toward inventory collection.
Understanding the affected module helps avoid unnecessary database repairs when the root cause lies elsewhere.
Check Service Status
Verify that the Wazuh manager is running properly.
sudo systemctl status wazuh-managerYou should review:
- Current service state
- Restart count
- Recent failures
- Resource consumption
- Crash timestamps
Repeated restarts often indicate that worker thread crashes are occurring continuously.
For additional detail:
journalctl -u wazuh-manager -n 100can provide useful context.
Examine Recent Configuration Changes
Many oversized frame incidents begin shortly after an environmental change.
Review anything modified before the first occurrence of the error.
New Integrations
Ask:
- Was a new API integration deployed?
- Was a custom script introduced?
- Were new log sources added?
Custom integrations are frequent contributors to malformed payloads.
Policy Changes
Review recent modifications to:
- FIM policies
- Syscollector settings
- Vulnerability scanning configurations
- Log collection rules
Large-scale policy changes can significantly increase payload sizes.
Agent Deployments
Large agent rollouts can suddenly increase:
- Inventory collection traffic
- Vulnerability correlation workloads
- Database write volume
If the error appeared immediately after onboarding many endpoints, this may be relevant.
Recent Upgrades
Verify whether:
- The manager was upgraded
- Cluster nodes were upgraded
- Agents were upgraded
- Databases were migrated
Version mismatches frequently emerge after incomplete upgrade procedures.
Solution 1: Restart Wazuh Services
If the issue was caused by a transient communication problem, restarting services may clear the condition and restore normal operation.
While this is not a permanent fix for underlying corruption or configuration issues, it is a useful first troubleshooting step.
Restart the Manager
Restart the Wazuh manager:
sudo systemctl restart wazuh-managerIf using a clustered deployment, restart nodes individually to avoid introducing additional synchronization problems.
Allow the service several minutes to initialize fully before evaluating results.
Verify Service Recovery
After the restart completes, verify that the manager started successfully.
sudo systemctl status wazuh-managerA healthy output should indicate:
Active: active (running)If the service immediately enters a failed state, deeper troubleshooting will be required.
Confirm Error Disappearance
A successful restart is only the beginning.
You must confirm that the oversized frame issue no longer occurs.
Review Logs
Monitor logs in real time:
sudo tail -f /var/ossec/logs/ossec.logLook for:
- No new oversized frame messages
- No worker thread crashes
- Successful module initialization
- Stable database communication
Monitor Service Stability
Continue monitoring for at least 15–30 minutes.
Pay attention to:
- CPU utilization
- Memory consumption
- Restart counts
- Database warnings
Transient issues often reappear shortly after startup if the root cause remains unresolved.
Check Dashboard Health
Finally, verify that the Wazuh dashboard reflects healthy operation.
Confirm that:
- Agents are reporting normally
- Vulnerability data is updating
- Inventory information is current
- No dashboard errors are present
If the oversized frame error returns after the restart, proceed to the next troubleshooting solution, where we’ll investigate database corruption and damaged Wazuh database files.
Solution 2: Verify Wazuh Version Compatibility
Version incompatibilities are a common cause of unexpected communication failures between Wazuh components.
When agents, managers, indexers, or cluster nodes run incompatible versions, malformed database requests and oversized frame errors can occur.
This is especially common after partial upgrades where some systems are updated while others remain on older releases.
Check Manager Version
Start by identifying the version of the Wazuh manager.
/var/ossec/bin/wazuh-control infoYou can also verify the installed package version:
rpm -qa | grep wazuh-managerOn Debian-based systems:
dpkg -l | grep wazuh-managerRecord the version number for comparison with agents and cluster nodes.
Verify Agent Versions
Next, verify the versions of all connected agents.
List registered agents:
/var/ossec/bin/agent_control -lFor a specific agent:
/var/ossec/bin/agent_control -i <agent_id>Example:
/var/ossec/bin/agent_control -i 005Review:
- Agent version
- Registration status
- Last keepalive time
- Operating system
List Connected Agents
In larger environments, exporting agent information may make analysis easier.
/var/ossec/bin/agent_control -l > agents.txtReview the output and identify systems that are running significantly older versions.
Identify Outdated Systems
Look for agents that are:
- Multiple major versions behind
- Running unsupported releases
- Recently restored from backups
- Not upgraded during previous maintenance windows
Older agents may generate data structures that newer managers no longer expect.
Common examples include:
- Legacy Syscollector formats
- Older vulnerability detection records
- Deprecated API fields
- Obsolete synchronization messages
Check Release Compatibility
Review Wazuh’s official compatibility guidance before making changes.
Verify compatibility between:
- Manager and agents
- Manager and indexer
- Manager and dashboard
- Cluster nodes
Major version mismatches should be addressed immediately.
Wazuh Release Notes: https://documentation.wazuh.com/current/release-notes/
Upgrade Mismatched Components
If incompatible versions are discovered, upgrade affected systems.
Prioritize:
- Wazuh manager
- Indexer cluster
- Dashboard
- Endpoint agents
Avoid upgrading components in a random order, as this can temporarily worsen compatibility issues.
Recommended Upgrade Paths
Generally, upgrades should follow supported release paths.
For example:
- 4.6 → 4.7 → 4.8
- 4.7 → 4.8 → 4.9
Skipping major upgrade paths may leave databases and internal schemas in an inconsistent state.
Always consult official upgrade documentation before proceeding.
Supported Version Combinations
As a general best practice:
- Keep all manager nodes on the same version.
- Keep cluster nodes synchronized.
- Keep agents reasonably close to the manager version.
- Avoid running unsupported releases.
Version consistency significantly reduces the likelihood of communication-related errors.
Post-Upgrade Validation
After upgrading:
Verify manager health:
sudo systemctl status wazuh-managerMonitor logs:
sudo tail -f /var/ossec/logs/ossec.logConfirm:
- No oversized frame errors
- No worker thread crashes
- Successful agent communication
- Proper vulnerability scans
- Healthy cluster synchronization
If crashes continue despite version alignment, investigate database corruption next.
Solution 3: Investigate Database Corruption
If version compatibility checks reveal no issues, the next likely cause is corruption within the Wazuh database files.
Database corruption can create malformed records that cause oversized frame generation whenever the affected data is accessed.
Stop the Wazuh Manager
Before working with database files, stop the manager.
sudo systemctl stop wazuh-managerVerify that all related processes have stopped:
ps aux | grep wazuhNo active database writes should occur while investigating corruption.
Backup Database Files
Always create a backup before modifying or rebuilding databases.
cp -r /var/ossec/queue/db /root/wazuh-db-backupVerify the backup exists:
ls -lah /root/wazuh-db-backupThis backup provides a recovery point if rebuilding procedures produce unexpected results.
Inspect Database Integrity
The next step is determining whether corruption actually exists.
Several indicators can suggest database problems.
Common Corruption Indicators
Potential warning signs include:
- Frequent database-related crashes
- Oversized frame errors after startup
- Missing inventory records
- Inconsistent vulnerability data
- Agent information disappearing unexpectedly
- Database lock errors
These symptoms often appear together.
Log Patterns
Search the logs for database warnings.
grep -i database /var/ossec/logs/ossec.logAlso search for:
grep -i corruption /var/ossec/logs/ossec.logand
grep -i wdb /var/ossec/logs/ossec.logCommon indicators include:
database malformed
invalid frame
database integrity error
cannot read recordThe exact wording varies by version.
File Consistency Checks
Review database file sizes.
du -sh /var/ossec/queue/db/*Look for:
- Unexpectedly large files
- Zero-byte databases
- Recently modified files coinciding with the first crash
Compare suspicious files against healthy environments when possible.
On Linux systems, filesystem checks may also help identify underlying storage problems:
dmesg | grep -i errorStorage-related errors often contribute to database corruption.
Rebuild Corrupted Databases
If corruption is strongly suspected, rebuilding the affected database may resolve the issue.
This forces Wazuh to regenerate internal records.
Safe Rebuild Procedure
First rename the existing database directory:
mv /var/ossec/queue/db /var/ossec/queue/db.oldCreate a replacement directory:
mkdir /var/ossec/queue/dbAssign proper ownership:
chown -R wazuh:wazuh /var/ossec/queue/dbThe exact ownership may vary depending on the deployment.
Data Recovery Considerations
Before rebuilding, understand the potential impact.
You may lose:
- Cached inventory information
- Vulnerability correlation data
- Internal database state
- Historical metadata
Most information can eventually be repopulated from connected agents, but temporary data gaps may occur.
For production environments, validate recovery requirements before proceeding.
Service Restart Process
After rebuilding:
sudo systemctl start wazuh-managerVerify successful startup:
sudo systemctl status wazuh-managerThen monitor logs carefully:
sudo tail -f /var/ossec/logs/ossec.logIf oversized frame errors disappear after the rebuild, database corruption was likely the root cause.
Solution 4: Identify Oversized Agent Payloads
If the database itself is healthy, an endpoint agent may be generating unusually large payloads that exceed Wazuh’s frame size limits.
This is particularly common with Syscollector, FIM, vulnerability scanning, and custom log ingestion.
Enable Detailed Logging
To identify the exact source of oversized frames, temporarily increase logging verbosity.
Higher log levels provide more insight into the requests being processed before the crash occurs.
After modifying the logging configuration, restart the manager:
sudo systemctl restart wazuh-managerAllow the system to run until the error reappears.
Increase Debugging Level
Depending on the Wazuh version, debugging can be increased within the manager configuration.
Higher debug levels often reveal:
- Module names
- Agent identifiers
- Database operations
- Payload processing details
Use caution in production environments, as verbose logging can generate large log volumes.
Capture Problematic Messages
Monitor logs during the failure window.
sudo tail -f /var/ossec/logs/ossec.logFocus on entries immediately preceding:
wazuh-modulesd: ERROR: Database error: Oversized frame.
wazuh-modulesd: CRITICAL: Worker thread crashed.The preceding messages frequently identify the responsible module or agent.
Locate the Offending Agent
Once a pattern emerges, determine whether a specific endpoint consistently appears before the crash.
Indicators include:
- Repeated references to the same agent ID
- Consistent hostname appearances
- Crashes triggered after agent synchronization
- Failures occurring during inventory updates
The goal is to isolate the system generating the oversized data.
Agent Identification Techniques
Useful commands include:
/var/ossec/bin/agent_control -land
/var/ossec/bin/agent_control -i <agent_id>Cross-reference:
- Agent IDs
- Hostnames
- Last connection times
- Operating systems
This helps identify whether a specific endpoint aligns with crash events.
Correlation with Crash Timestamps
Create a timeline of:
- Worker thread crashes
- Agent check-ins
- Inventory scans
- Vulnerability scans
- FIM activity
If crashes consistently occur immediately after a particular agent reports data, that agent becomes a primary suspect.
Review Agent Activity
Once a suspect endpoint has been identified, examine the type of data being collected.
Focus on the modules most commonly associated with oversized frames.
Look for Massive Syscollector Inventories
Review systems that contain:
- Thousands of installed packages
- Extensive software inventories
- Large development environments
- Multiple container runtimes
These environments often generate unusually large inventory datasets.
Look for Large FIM Events
Investigate whether the agent is monitoring:
- Massive directories
- Build repositories
- Application cache locations
- Log archives
Large file metadata collections can produce oversized database entries.
Look for Excessive Vulnerability Data
Endpoints with extremely large software inventories may generate excessive vulnerability correlation results.
Examples include:
- Software build servers
- Package mirrors
- Container hosts
- Development workstations
These systems can create unusually large vulnerability datasets.
Look for Custom Log Ingestion Spikes
Finally, review custom integrations and log collection rules.
Potential issues include:
- Multi-megabyte log entries
- Nested JSON documents
- Application dumps
- Bulk API responses
- Custom scripts generating oversized events
If disabling a particular log source eliminates the oversized frame error, the root cause has likely been identified and can be remediated through filtering, truncation, or payload validation.
Solution 5: Validate Custom Integrations and Scripts
Custom integrations are one of the most underestimated sources of oversized frame errors.
Unlike native Wazuh modules, external scripts and API-driven integrations often lack strict payload controls, which can lead to unexpectedly large or malformed database frames being generated and passed to wazuh-db.
When these payloads exceed internal size limits, wazuh-modulesd may reject them, triggering worker thread crashes.
Review Integration Configurations
Start by auditing all active integrations within your Wazuh environment.
Focus on configuration files such as:
/var/ossec/etc/ossec.conf- Custom integration directories
- Script execution paths
Look specifically for:
- Enabled integrations that were recently added
- Webhook-based connectors
- Scheduled data ingestion jobs
- External API polling scripts
Pay attention to integrations that operate on high-frequency schedules or process bulk data responses.
Check: Active Integrations
Identify all currently active integrations by reviewing configuration blocks such as:
<integration><command><active-response>- Custom module definitions
Look for:
- VirusTotal integrations
- Cloud provider connectors (AWS, Azure, GCP)
- SIEM forwarding pipelines
- Threat intelligence feeds
Misconfigured or overly verbose integrations often generate large payloads that exceed expected frame limits.
Related Guide:
How to Integrate Wazuh with VirusTotal for Threat Intelligence
Check: Webhook Processors
Webhook-based integrations are particularly sensitive to payload size issues.
Review:
- Incoming webhook endpoints
- JSON transformation scripts
- Event enrichment logic
Common problems include:
- Unfiltered API responses
- Recursive JSON structures
- Unbounded arrays or logs
- Missing payload truncation
If webhook payloads are not validated or constrained, they can easily exceed Wazuh’s internal frame limits.
Check: External Scripts
External scripts invoked by Wazuh (e.g., Python, Bash, or Node.js scripts) can also introduce oversized frames.
Inspect scripts for:
- Bulk data aggregation
- Large JSON serialization
- Logging full API responses
- Unfiltered system dumps
Scripts that work fine in isolation may become problematic when executed at scale across many agents.
Inspect Payload Sizes
A key step is identifying whether integrations are generating unusually large payloads.
Focus on:
API Responses
Check whether external APIs are returning:
- Large JSON objects
- Nested datasets
- Full historical logs instead of incremental updates
Without pagination or filtering, APIs can overwhelm Wazuh ingestion pipelines.
JSON Documents
Look for:
- Deeply nested JSON structures
- Large arrays of events
- Repeated or redundant fields
Even valid JSON can cause oversized frame errors if it exceeds internal size constraints.
Third-Party Connector Data
Integrations with third-party systems (e.g., SIEMs, EDR platforms, cloud services) may produce:
- Bulk event exports
- Full system snapshots
- High-frequency telemetry dumps
These data streams should always be validated and filtered before ingestion.
Test Integrations Individually
To isolate the root cause, test integrations one at a time.
This helps determine whether a specific integration is responsible for oversized frame generation.
Isolate Integrations
Temporarily disable non-essential integrations:
- Comment out integration blocks in
ossec.conf - Stop custom scripts
- Disable webhook receivers
Then restart the manager:
sudo systemctl restart wazuh-managerMonitor logs for recurrence of the oversized frame error.
Disable Temporarily
If the error disappears after disabling a specific integration, that component is likely the cause.
Re-enable integrations one at a time to confirm.
This incremental approach helps avoid guesswork and isolates the offending data source precisely.
Re-enable Incrementally
Once stability is restored:
- Re-enable a single integration
- Monitor system behavior
- Wait for log verification
- Repeat for the next integration
This method ensures that only stable integrations are kept active in production.
Solution 6: Check Cluster Synchronization Issues
In Wazuh cluster deployments, synchronization between nodes introduces additional communication overhead.
If cluster data becomes corrupted or excessively large, it can trigger oversized frame errors during replication or inter-node communication.
Verify Cluster Health
Start by checking cluster status:
/var/ossec/bin/cluster_control -lThis command provides a list of:
- Active nodes
- Node roles (master/worker)
- Synchronization status
- Connectivity health
Look for:
- Nodes marked as disconnected
- Sync delays
- Inconsistent states
- Failed replication indicators
Inspect Cluster Logs
Cluster-related issues often appear in logs before triggering worker thread crashes.
Review logs on all nodes:
grep -i cluster /var/ossec/logs/ossec.logLook for:
- Synchronization failures
- Large transfer events
- Replication errors
- Timeout messages
- Frame-related warnings
Synchronization Failures
Failures in synchronization can occur when:
- Nodes are temporarily disconnected
- Network latency is high
- Data transfers exceed size limits
- Schema mismatches exist between nodes
These issues may result in incomplete or malformed synchronization frames.
Large Transfer Events
Cluster nodes regularly exchange:
- Agent states
- Configuration updates
- Vulnerability data
- Internal metadata
If any of these datasets become excessively large, they may exceed frame size limits during replication.
Replication Errors
Replication issues often manifest as:
- Partial data updates
- Inconsistent database states
- Failed synchronization cycles
- Repeated retry loops
These errors can contribute directly to oversized frame crashes when corrupted data is processed repeatedly.
Rebuild Cluster Synchronization
If cluster corruption is suspected, rebuilding synchronization may be required.
Rejoin Affected Nodes
On affected worker nodes:
- Stop Wazuh manager:
sudo systemctl stop wazuh-manager- Remove stale synchronization state (if applicable)
- Rejoin the cluster using the appropriate configuration
Restart the service:
sudo systemctl start wazuh-managerClear Synchronization Queues
In some cases, queued synchronization data may become corrupted.
Clearing these queues forces regeneration of cluster state and can resolve persistent inconsistencies.
Validate Replication
After recovery steps:
- Confirm cluster stability using
cluster_control - Monitor logs for replication errors
- Ensure all nodes show synchronized status
- Verify agent consistency across nodes
A healthy cluster should maintain consistent state without repeated synchronization warnings or oversized frame errors.
Wazuh Cluster Documentation – https://documentation.wazuh.com/current/user-manual/wazuh-server-cluster/
Solution 7: Review System Resources
Although oversized frame errors are often caused by malformed data, database corruption, or version mismatches, resource exhaustion can sometimes contribute to the problem.
When a Wazuh manager is operating under heavy load, delayed processing, incomplete writes, and unstable inter-process communication may increase the likelihood of database-related failures.
Reviewing system resources helps determine whether underlying infrastructure limitations are contributing to worker thread crashes.
Check Available Memory
Start by checking available memory.
free -hExample output:
total used free
Mem: 16Gi 14Gi 1.2Gi
Swap: 4Gi 2.5Gi 1.5GiPay attention to:
- Available RAM
- Swap usage
- Memory exhaustion
- Sudden memory spikes
High swap utilization may indicate memory pressure affecting Wazuh services.
Check Disk Space
Verify that adequate disk space remains available.
df -hExample:
Filesystem Size Used Avail Use%
/dev/sda1 100G 95G 5G 95%A nearly full filesystem can create:
- Database write failures
- Corrupted records
- Synchronization issues
- Service instability
Pay particular attention to:
/var/var/ossec- Database storage volumes
- Log partitions
Monitor Resource Consumption
Monitor real-time resource usage.
topYou can also use:
htopif installed.
Look for:
- High CPU utilization
- Excessive memory consumption
- I/O wait time
- Runaway Wazuh processes
- Repeated process restarts
Particular processes to monitor include:
wazuh-managerwazuh-dbwazuh-modulesdwazuh-analysisdwazuh-remoted
Why Resource Constraints Can Contribute to Database Errors
Resource shortages rarely create oversized frames directly, but they can increase the likelihood of database communication failures and corruption.
Memory Pressure
When memory becomes scarce:
- Processes compete for RAM
- Swap activity increases
- Database operations slow down
- Worker threads experience delays
In extreme cases, the Linux OOM (Out of Memory) killer may terminate critical Wazuh components.
Check for OOM events:
dmesg | grep -i oomor
journalctl -k | grep -i "out of memory"Disk I/O Bottlenecks
Storage performance can significantly impact Wazuh.
Common causes include:
- Slow disks
- Shared storage contention
- Overloaded virtual environments
- Excessive logging activity
High I/O latency may result in:
- Delayed database writes
- Incomplete transactions
- Synchronization failures
Investigate disk performance using:
iostat -x 5if available.
Database Processing Delays
When the system is overloaded, database queues can grow rapidly.
This may lead to:
- Backlogged requests
- Synchronization delays
- Increased memory consumption
- Module communication timeouts
While resource issues may not be the primary cause, they often amplify existing problems and should be addressed as part of a comprehensive troubleshooting process.
Advanced Troubleshooting
If the oversized frame error persists after standard remediation steps, deeper analysis may be necessary.
The following techniques can help isolate complex or intermittent failures.
Enable Wazuh Debug Logging
Debug logging provides significantly more visibility into internal component interactions.
Higher log verbosity may reveal:
- Module-specific failures
- Database request details
- Synchronization issues
- Agent communication anomalies
After enabling debugging, restart the manager and carefully monitor:
sudo tail -f /var/ossec/logs/ossec.logBe aware that debug logging can generate substantial log volume in busy environments.
Analyze Crash Patterns
Look for recurring characteristics surrounding worker thread crashes.
Questions to investigate include:
- Does the crash occur at the same time every day?
- Does it coincide with vulnerability feed updates?
- Is it triggered by specific agents?
- Does it happen during cluster synchronization?
- Does it occur after configuration changes?
Building a timeline often reveals patterns that are not obvious from individual log entries.
Create a crash timeline by searching logs:
grep -i "worker thread crashed" /var/ossec/logs/ossec.logCompare timestamps with:
- Agent check-ins
- Vulnerability scans
- FIM scans
- Synchronization events
- Scheduled maintenance jobs
Capture Database Communications
In rare cases, network-level inspection can help identify malformed communications.
Useful tools include:
stracetcpdumplsofThese tools can help determine:
- Which process generated the problematic request
- When communication failures occur
- Whether database sockets are behaving normally
This level of troubleshooting is typically reserved for persistent production issues that cannot be reproduced through standard diagnostics.
Compare Behavior Across Multiple Nodes
For clustered deployments, compare healthy and unhealthy nodes.
Review:
- Configuration differences
- Software versions
- Database sizes
- Synchronization status
- Resource utilization
Questions to ask:
- Does the issue occur on all nodes?
- Does it only affect one manager?
- Did one node recently receive a configuration change?
Differences between nodes often reveal the source of elusive problems.
Related Guide:
How to Build a Wazuh Indexer Cluster
Review Recent Wazuh Release Notes for Known Bugs
Occasionally, oversized frame errors are caused by software defects rather than environmental problems.
Before spending extensive time troubleshooting, review recent release notes and issue trackers.
Look for reports involving:
wazuh-dbwazuh-modulesd- Syscollector
- Vulnerability Detection
- Cluster synchronization
- Worker thread crashes
The Wazuh community frequently documents known bugs and recommended workarounds.
Preventing Future Oversized Frame Errors
Once the immediate issue has been resolved, implementing preventive measures can significantly reduce the likelihood of future worker thread crashes.
Keep Agents and Managers on Compatible Versions
Version consistency remains one of the most effective preventive measures.
Best practices include:
- Upgrading agents regularly
- Maintaining cluster version alignment
- Following supported upgrade paths
- Removing unsupported releases
Avoid environments where agents lag several major versions behind the manager.
Monitor Database Health Regularly
Proactively monitor database health indicators such as:
- Database size growth
- Error frequency
- Corruption warnings
- Synchronization failures
Regular review of ossec.log can identify issues before they become service-impacting incidents.
Consider creating scheduled health checks that verify:
- Database responsiveness
- Manager uptime
- Module health
- Agent communication status
Limit Excessively Large Data Sources
Large datasets increase the risk of oversized frames and processing bottlenecks.
Review data sources such as:
- Syscollector inventories
- Vulnerability feeds
- FIM-monitored directories
- Custom application logs
Where appropriate:
- Exclude unnecessary files
- Reduce inventory scope
- Filter excessive log sources
- Remove redundant monitoring
This reduces database workload and improves stability.
Validate Custom Integrations Before Production Deployment
Custom integrations should be tested thoroughly before deployment.
Validation should include:
- Payload size testing
- Error handling verification
- Input sanitization
- Stress testing
Any integration capable of generating large JSON objects or bulk database requests should be reviewed carefully.
Poorly tested integrations are a frequent source of malformed database communications.
Implement Log Monitoring and Alerting
Early detection dramatically reduces troubleshooting effort.
Consider creating alerts for:
- Oversized frame errors
- Worker thread crashes
- Database warnings
- Synchronization failures
- Module restarts
Automated alerting enables administrators to respond before service degradation becomes widespread.
Wazuh Email Alerts Not Working? Complete Fix Guide
Perform Regular Database Backups
Regular backups provide a recovery path if corruption occurs.
Recommended backup targets include:
/var/ossec/queue/db- Manager configuration files
- Custom rules
- Decoders
- Cluster configuration
A tested backup strategy minimizes downtime during recovery operations.
Test Upgrades in Staging Environments
Many oversized frame issues appear shortly after upgrades.
Before updating production systems:
- Deploy upgrades in a staging environment.
- Validate agent communication.
- Test vulnerability scanning.
- Verify cluster synchronization.
- Review database behavior.
This approach helps identify compatibility problems before they affect critical monitoring infrastructure.
Organizations following staged upgrade practices typically experience fewer database communication issues and more predictable Wazuh deployments.
Frequently Asked Questions (FAQ)
Question: What causes the “wazuh-modulesd database error oversized frame” message?
The error occurs when Wazuh receives or processes a database communication frame that exceeds the maximum size expected by the internal wazuh-db communication protocol. This typically results from:
- Corrupted database records
- Excessively large agent payloads (Syscollector, FIM, vulnerability data)
- Malformed or truncated messages
- Version mismatches between components
- Faulty custom integrations generating oversized JSON or logs
In all cases, the underlying issue is a violation of expected frame size constraints within Wazuh’s internal IPC system.
Question: Can oversized frame errors crash Wazuh services?
Yes. In certain scenarios, oversized frame errors can lead to worker thread termination inside wazuh-modulesd.
When a worker thread encounters a frame it cannot safely parse, it may:
- Abort processing to prevent memory corruption
- Crash the thread handling the request
- Interrupt communication with
wazuh-db
This can cascade into:
- Lost vulnerability updates
- Missing inventory data
- Broken module synchronization
- Temporary service instability
Question: Is database corruption a common cause?
Yes. Database corruption is one of the most frequent root causes of oversized frame errors.
It typically arises from:
- Abrupt system shutdowns
- Disk failures or I/O errors
- Interrupted writes during heavy load
- Filesystem inconsistencies
- Incomplete upgrades or migrations
Once corrupted, the database may produce invalid or oversized frames during normal operations, triggering worker thread crashes.
Question: How do I find which agent is causing the issue?
Identifying the offending agent requires correlating logs with crash timestamps.
Recommended approach:
- Review
/var/ossec/logs/ossec.logaround the time of the error - Enable debug logging for deeper visibility
- Look for repeated references to specific agent IDs or hostnames
- Correlate spikes in activity (Syscollector, FIM, vulnerability scans)
Often, a single misconfigured or high-volume agent is responsible for generating oversized payloads.
Question: Does upgrading Wazuh fix oversized frame errors?
Yes, in some cases.
Upgrading can resolve the issue when it is caused by:
- Known bugs in
wazuh-modulesdorwazuh-db - Protocol mismatches between versions
- Deprecated communication formats
- Cluster synchronization incompatibilities
However, upgrading alone will not fix issues caused by:
- Database corruption
- Misconfigured integrations
- Oversized agent payloads
A full diagnosis should always be performed before relying on upgrades as a fix.
Question: Can I safely rebuild the Wazuh database?
Yes, but only with proper precautions.
Rebuilding the database is safe when:
- A full backup has been created
- The corruption is isolated to
wazuh-dbdata - You understand the temporary loss of cached state
During rebuilds, you may lose:
- Cached syscollector data
- Vulnerability correlation state
- Temporary internal metadata
However, this data is typically regenerated as agents continue reporting.
Always follow a controlled recovery procedure in production environments.
Conclusion
The “wazuh-modulesd database error oversized frame” and associated worker thread crashes represent a critical failure in Wazuh’s internal database communication pipeline, where oversized or malformed frames exceed expected processing limits.
Across all troubleshooting scenarios, the most common root causes include:
- Database corruption
- Oversized agent payloads (Syscollector, FIM, vulnerability data)
- Version incompatibilities between agents, managers, or cluster nodes
- Faulty or unvalidated custom integrations
- Cluster synchronization inconsistencies
- System resource constraints affecting processing stability
The most effective remediation strategy follows a structured progression:
- Validate system resources and stability
- Check version compatibility across all components
- Investigate and rebuild corrupted database files if necessary
- Isolate oversized payload sources at the agent or integration level
- Verify cluster synchronization health in distributed environments
- Apply controlled restarts and incremental testing for validation
Long-term stability depends on maintaining strict version alignment, enforcing payload validation for all integrations, and regularly monitoring database health and agent behavior.
By applying these practices, administrators can significantly reduce the likelihood of worker thread crashes and ensure a stable, reliable Wazuh deployment capable of sustained security monitoring at scale.

Be First to Comment