AD Replication Error 8304: The Maximum Size of an Object Has Been Exceeded

Fix AD replication error 8304 (the maximum size of an object has been exceeded): find the object in event 1084, trim the multi-valued attribute on the source DC, or recycle a deleted object with Remove-ADObject.

Home › Guides › AD replication error 8304

Last updated 19 November 2026

Quick answer

Error 8304 (0x2070), "The maximum size of an object has been exceeded", means a DC tried to replicate an object that is too big for an AD database record. The usual cause is a non-linked multi-valued attribute with too many values: with the 8 KB database record size the limit is about 1,200-1,300 values, depending on what else is stored in the object's other non-linked attributes. There is no workaround for the limit itself:

  1. Read event 1084 on the destination DC: it names the object and the source DC.
  2. Live object: find the attribute with too many values and remove some of them on the source DC.
  3. Deleted object, recycle bin enabled: on the source DC, force it into the recycled state with Get-ADObject ... -IncludeDeletedObjects | Remove-ADObject, then force replication.
  4. Longer term, revise the application that fills the attribute.

Run net helpmsg 8304 to get the error text on any Windows machine.

What the error looks like

dcdiag Replications test:

Starting test: Replications
    [Replications Check, <DESTINATION DC>] A recent replication attempt failed:
        From <SOURCE DC> to <DESTINATION DC>
        Naming Context: <directory partition DN path>
        The replication generated an error (8304):
        The maximum size of an object has been exceeded.
        The failure occurred at <date><time>.
        The last success occurred at <date><time>.
    ......................... <DESTINATION DC> failed test Replications

Replicate now on a connection object fails with "The following error occurred during the attempt to synchronize naming context <partition> from domain controller <source DC> to domain controller <destination DC>: The maximum size of an object has been exceeded. The operation will not continue."

repadmin commands such as /add, /replsum, /showrepl and /syncall fail with 8304.

Event 1084 (source Microsoft-Windows-ActiveDirectory_DomainService, task category Replication, level Error, user ANONYMOUS LOGON) on the DC trying to replicate the object inbound:

Internal event: Active Directory Domain Services could not update the following object with changes received from the following source directory service. This is because an error occurred during the application of the changes to Active Directory Domain Services on the directory service.
Object:
CN=john\0ADEL:<GUID>,CN=Deleted Objects,<directory partition DN path>
Object GUID:
<GUID>
Source directory service:
<GUID>._msdcs.contoso.com
Synchronization of the directory service with the source directory service is blocked until this update problem is corrected.
This operation will be tried again at the next scheduled replication.
...
Error value:
8304 The maximum size of an object has been exceeded.

The event's own user action is to restart the computer if the condition seems related to low system resources; with 8304 the cause is the object's size, covered below.

Event 1093 (warning) may appear too: AD DS couldn't update the object because the incoming change made it exceed the maximum object record size, so the change to the named attribute (Microsoft's example is 9030d (lastKnownParent)) is reversed, and the current local value replicates out to counteract it. The event quotes the attribute whose update made the object overflow, which may not be the attribute holding the most data.

Why it happens

8304 is logged when a DC tries to replicate an object larger than the maximum size. Points from Microsoft's article:

Attributes where Microsoft has seen it:

Windows Server 2025 and 32k pages. Microsoft's note (written while Windows Server 2025 was in preview): in a forest where every DC runs Windows Server 2025 or later, the forest and domain functional levels are Windows Server 2025 or later, and the Database 32k pages optional feature is enabled, multi-valued attributes can hold roughly 3,200 values, so the problem is much less likely.

Step 1: find the object and the attribute

Event 1084 on the destination DC lists the object that exceeded the size and the source DC (as <GUID>._msdcs.<forest>). On the source DC, dump the object with LDP or with:

repadmin /showattr <source DC> "<object DN>" /allvalues /extended

Microsoft's example output for a deleted object (note the value count in front of each attribute):

1> distinguishedName:<GUID=<GUID>>;CN=Allowedclients\0ADEL:<GUID>,CN=Deleted Objects,CN=Configuration,DC=contoso,DC=com
1> instanceType: 0x4 = ( WRITE )
...
1> msDS-LastKnownRDN: Allowed clients
1> msExchSmtpReceiveMaxRecipientsPerMessage: 200
1243> msExchSmtpReceiveRemoteIPRanges:10.142.241.142;...

Here msExchSmtpReceiveRemoteIPRanges shows 1243, in the 1,200-1,300 range where the limit is usually hit.

Step 2: fix a live object

If the object isn't deleted, identify the attribute with too many values and remove some of the values on the source DC. Because there is no workaround for the limit, you may need to change the application or process that keeps adding values.

Step 3: fix a deleted object (recycle bin enabled)

If the object is deleted and the AD Recycle Bin is enabled, the best fix is to force it into the recycled state. Recycling strips most attributes, which usually makes the object small enough to replicate. It also deletes the object for good: you can't restore it from the recycle bin afterwards.

Run this on the DC listed as the source in event 1084, using the DN from the event:

Get-ADObject <dn of object> -IncludeDeletedObjects | Remove-ADObject

For example:

Get-ADObject "CN=john\0ADEL:<GUID>,CN=Deleted Objects,dc=contoso,dc=com" -IncludeDeletedObjects | Remove-ADObject

(Microsoft's example line leaves out -IncludeDeletedObjects; it's in their syntax line, so it's included here.) Then use Active Directory Sites and Services to force replication.

Don't undelete it. If the object is a security principal such as a user account, Microsoft recommends you don't restore it. Undeleting a large enough object can leave some attributes unset, damaging the object so it can't be used or even deleted.

Known patterns and how to avoid them

dnsRecord and many DCs. Each IP address or SRV target is one more value of a DNS node's dnsRecord attribute. Every DC registers a set of names, some per site it covers and some site-less; the limit is usually reached on the site-less names. Domains approaching around 1,200 DCs can have trouble updating those records, and usually don't want that many entries in the site-less names anyway. Microsoft's fix is the DnsAvoidRegisterRecords registry value on the DCs that shouldn't appear in the site-less names.

DFS version 1 namespaces (attribute PKT). A version 1 namespace keeps all its link information in a single attribute on one AD object. Managing the namespace runs into problems once that blob passes 5 MB (roughly 5,000 links). Version 2 namespaces, introduced in Windows Server 2008, store each DFS link as a separate AD object.

Related tools and guides

Look up 1084 and 1093 in the Windows Event ID Lookup, copy the net helpmsg, repadmin /showattr /allvalues /extended and Remove-ADObject lines from the PowerShell Cheat Sheet, count the values in a saved repadmin /showattr dump with the Regex Tester, check whether the addresses in a long msExchSmtpReceiveRemoteIPRanges list fall into a few subnets with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and identify the network adapter vendor on a DC with the MAC Vendor Lookup. Related guides: replication error 1127, replication error 8451, replication error 8452 and replication error 8606.

Every AD replication error code with its cause and fix: common Active Directory replication errors.

FAQ

What does AD replication error 8304 mean?

The maximum size of an object has been exceeded (0x2070). A DC tried to replicate an object too big for an AD database record, usually because a non-linked multi-valued attribute has too many values, about 1,200-1,300 with the 8 KB record size.

Which attributes cause error 8304?

Any multi-valued non-linked attribute can. Microsoft lists proxyAddresses, servicePrincipalName, userCertificate, msExchSmtpReceiveRemoteIPRanges, dnsRecord, msiFileList, msTSProperty01/02 and registeredAddress. Linked attributes aren't affected. A single value over about 5 MB can also trigger it.

How do I find the object behind 8304?

Event 1084 on the destination DC names the object and the source DC. On the source DC, dump the object with LDP or repadmin /showattr with /allvalues /extended and look for the attribute with a very large value count.

How do I fix 8304 for a deleted object?

If the AD Recycle Bin is enabled, run Get-ADObject with the DN and -IncludeDeletedObjects, piped to Remove-ADObject, on the source DC named in event 1084. That recycles the object and strips most attributes. It can't be restored afterwards. Then force replication.

Should I undelete an object that hit 8304?

No, not if it's a security principal such as a user. Microsoft warns that undeleting a large enough object can leave attributes unset and damage the object so it can't be used or even deleted.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.