apache/shardingsphere · error · ExcessTransactionsException

Attempt to start more than %d transactions

Error message

Attempt to start more than %d transactions

What it means

Error "Attempt to start more than %d transactions" thrown in apache/shardingsphere.

Source

Thrown at proxy/frontend/dialect/firebird/src/main/java/org/apache/shardingsphere/proxy/frontend/firebird/command/query/transaction/FirebirdStartTransactionCommandExecutor.java:55

    private static final int MAX_CONCURRENT_TRANSACTIONS = 1;
    
    private final FirebirdStartTransactionPacket packet;
    
    private final ConnectionSession connectionSession;
    
    @Override
    public Collection<DatabasePacket> execute() {
        validateNoActiveTransaction();
        connectionSession.setAutoCommit(packet.isAutoCommit());
        connectionSession.setReadOnly(packet.isReadOnly());
        connectionSession.setIsolationLevel(packet.getIsolationLevel());
        int transactionId = FirebirdTransactionIdGenerator.getInstance().nextTransactionId(connectionSession.getConnectionId());
        return Collections.singleton(new FirebirdGenericResponsePacket().setHandle(transactionId));
    }
    
    private void validateNoActiveTransaction() {
        if (FirebirdTransactionIdGenerator.getInstance().hasActiveTransaction(connectionSession.getConnectionId())) {
            throw new ExcessTransactionsException(MAX_CONCURRENT_TRANSACTIONS);
        }
    }
}

View on GitHub (pinned to e952770a21)

Solutions

  1. Commit or roll back existing transactions before starting new ones.
  2. Reduce the number of concurrently open transactions per connection.
  3. Increase the configured transaction limit if the workload legitimately needs more.

When it happens

Trigger: A Firebird start-transaction request exceeds the maximum number of concurrent transactions the proxy allows.

Common situations: Applications leaking transactions (never committing) until the per-connection transaction cap is reached.


AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14). Data as JSON: /api/errors/1cdd6c6ce6bef3ca. Report an issue: GitHub.