Stages are unable to start
search cancel

Stages are unable to start

book

Article ID: 380989

calendar_today

Updated On:

Products

Continuous Delivery Director Continuous Delivery Director SAAS

Issue/Introduction

There are 2 symptoms of problem :
 
  • Phase, linked to a stage in a track, does not start when it is approved.
    Workaround it to unapprove it and approve it again


  • When a stage in the track is started, several phases are unable to start. I the pipelines we could error "missing value of token" at phase level.
    When the phase is started again from the pipeline it works.

Environment

Continuous Delivery Director - All versions

Cause

In the logs, we could see that phases are failing due to the inability to acquire a JDBC connection.

Example of error in log cdd-server.*.log:

2024-09-23 11:01:09.703 [Execution_14718] [] ERROR c.c.r.e.i.PhaseExecutionServiceImpl - Got an exception during start phase.
org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
Both Problems (phases failing to start and phases remaining approved) are caused by the connection pool size. Since the track contains a large number of phases, the connection pool needs to be increased

Resolution

By default, CDD has a limit of 50 connections. This limit can be increased by adding the following property to the system.properties file:
 
cdd.dataSource.maxTotal=<number of connections>
 
Example :
cdd.dataSource.maxTotal=120
 
 
 
Remarks :
  • If the property already exists, simply update its value. After making this change, a restart of the CDD server will be required.
  • Before proceeding, please consult the DBA to ensure the database is configured to support this number of connections.