START GROUP_REPLICATION fails because the group already reached the maximum member limit defined by group_replication_group_size.
MySQL error 3191 (ER_GROUP_REPLICATION_MAX_GROUP_SIZE) means the START GROUP_REPLICATION command was rejected because the group already contains the maximum allowed members (default 9). Remove inactive members or raise group_replication_group_size, then retry START GROUP_REPLICATION to resolve the problem.
ER_GROUP_REPLICATION_MAX_GROUP_SIZE
Error 3191, condition ER_GROUP_REPLICATION_MAX_GROUP_SIZE, occurs when you run START GROUP_REPLICATION on a MySQL instance and the target replication group already contains the maximum number of members. The default limit is 9, but it can be configured using group_replication_group_size.
Because the request would exceed the defined limit, MySQL rejects the command and returns SQL state HY000 with the error text shown above. The node remains outside the group, and applications relying on group replication may experience availability issues.
The primary trigger is a mismatch between the current member count and the allowed maximum. If nine servers are already online in the group, any additional START GROUP_REPLICATION command fails immediately.
The limit can also be exceeded unintentionally when ghost members – servers still listed in performance_schema replication tables – were not removed correctly after shutdown, making MySQL believe the group is full.
The fastest remedy is to reduce the active member count. Stop group replication on an unused instance or remove a stale member with the RECOVER MEMBER action, then retry START GROUP_REPLICATION.
When legitimate capacity growth is needed, raise the group_replication_group_size value consistently on every member, restart the servers, and start replication again. Ensure the plugin variables match across the cluster to avoid compatibility issues.
During rolling upgrades, temporary servers join and leave quickly. If old nodes do not shut down cleanly, their membership persists, blocking new joins. Use the mysql_innodb_cluster metadata or performance_schema.group_replication_members to detect and clean up phantom entries.
In cloud auto-scaling environments, an instance template may spin up more members than intended. Implement an admission control script that checks current membership before calling START GROUP_REPLICATION to stop the error from surfacing in production.
Plan capacity headroom by setting group_replication_group_size slightly higher than the expected steady-state size. Monitor the group_replication_members table to detect unexpected member growth early.
Automate graceful leave operations with STOP GROUP_REPLICATION before terminating a node. Use orchestrators or configuration management tools to keep the group size setting consistent across every server.
ER_GROUP_REPLICATION_COMMAND_FAILURE appears when START GROUP_REPLICATION fails for other reasons, such as configuration mismatches. Investigate the detailed diagnostics reported in the Performance Schema tables.
ER_GROUP_REPLICATION_SECONDARY_FAILOVER indicates a problem with automatic primary election. While separate, it can coincide if an oversized group causes instability. Stabilize membership first, then address election issues.
All available slots defined by group_replication_group_size are occupied, so new nodes cannot join.
Servers that crashed or were force-stopped remain in the replication metadata, inflating the perceived count.
One or more servers advertise a higher group size while others retain a lower value, causing join validation to fail.
Cloud automation launches multiple replicas simultaneously without verifying current group size.
Generic failure when START GROUP_REPLICATION fails for configuration or network reasons.
Indicates a problem electing a new primary. Often surfaces after instability created by incorrect group size changes.
Raised when the replication plugin cannot be loaded, frequently due to plugin mismatch.
Yes. Set the variable on every member, then restart each server or use SET PERSIST. All nodes must share the same value before joining.
MySQL sets the default to 9 members. Attempting to exceed this limit without adjusting the variable triggers error 3191.
Query performance_schema.replication_group_members for members in OFFLINE or ERROR state. Remove them with group_replication_recovery_remove_member.
The Galaxy SQL editor highlights error 3191 instantly, offers AI-generated fixes, and lets teams version their replication scripts so configuration mismatches do not slip into production.