Transaction timeout, error 251

I
I have set db.runCommand( { setParameter: 1, transactionLifetimeLimitSeconds: 600 } ) on server and also the DefaultTransactionDefinition timeout to 600 seconds in my TransactionManager , as below
public void initializeMongoTransaction() {
if(this.mongoStatus == null || this.mongoStatus.isCompleted()) {
this.mongoTransactionManager = new MongoTransactionManager(dbFactory);
TransactionOptions transactionOptions = TransactionOptions.builder().readPreference(ReadPreference.primary())
.readConcern(ReadConcern.LOCAL).writeConcern(WriteConcern.MAJORITY).maxCommitTime(5L,TimeUnit.MINUTES).build();
this.mongoTransactionManager.setOptions(transactionOptions);
DefaultTransactionDefinition def = new DefaultTransactionDefinition();
def.setTimeout(600);
this.mongoStatus = this.mongoTransactionManager.getTransaction(def);
}
}
but still I get mongo error 251 when the transaction time is greater than 60 sec? How do i increase the timeout of transaction?