cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

CRITICAL ERROR ON STARTUP: An attempt by a client to checkout a Connection has timed out

Rajkumar_20673
12-Amethyst

CRITICAL ERROR ON STARTUP: An attempt by a client to checkout a Connection has timed out

 

I’m facing a database connectivity / connection pool checkout timeout issue during ThingWorx Foundation startup against AWS RDS PostgreSQL 16.6. ThingWorx goes into ERROR state even though database connectivity works from other clients.

Environment

  • ThingWorx Foundation: 9.7

  • OS: Ubuntu 22.04

  • Database: AWS RDS PostgreSQL 16.6

  • App Server: Tomcat 9.0.113

  • Java: Amazon Corretto 11.0.29

    • Path: /usr/lib/jvm/java-11-amazon-corretto

Error Seen (Startup)

ThingWorx fails on startup and sets the web app state to ERROR:

 

 
*** CRITICAL ERROR ON STARTUP: An attempt by a client to checkout a Connection has timed out. *** Web Application STATE is being set to ERROR! ***

 

This looks like the ThingWorx DB pool is unable to checkout a connection within the timeout (pool exhausted / blocked / cannot create new connections).

Important Observation

  • From the same EC2 instance, I can connect successfully using terminal tools (psql style connectivity).

  • I can also connect successfully using pgAdmin.
    So network reachability + credentials appear OK, but ThingWorx still fails with pool checkout timeout.

What I’ve checked / tried

  • Verified DB host/port/security group rules (DB reachable).

  • Verified credentials configured in platform-settings.json.

  • Reviewed multiple community articles about DB connectivity and PostgreSQL.

  • Restart attempts still intermittently lead to the same startup failure.

What I need help with

  1. Is PostgreSQL 16.6 fully supported with ThingWorx 9.7?
    If not, what Postgres version is recommended for TWX 9.7 (especially on AWS RDS)?

  2. What are the recommended ThingWorx DB pool (c3p0) settings for:

    • maxPoolSize, minPoolSize, checkoutTimeout, acquireRetryAttempts, etc.
      to avoid startup failure?

  3. Which RDS settings should I validate first for this symptom?

    • max_connections

    • idle/session limits

    • parameter group timeouts

    • connection spikes (CloudWatch: DatabaseConnections)

  4. Any known issues with:

    • Tomcat 9.0.113 on TWX 9.7

    • Corretto 11.0.29 on TWX 9.7
      that could affect JDBC pooling / startup?

  5. Rajkumar_20673_0-1766819934161.pngRajkumar_20673_1-1766819973376.pngRajkumar_20673_2-1766820084831.png

     

ACCEPTED SOLUTION

Accepted Solutions

Hello @Rajkumar_20673
 

I hope you are doing well.
 

Are you using AWS RDS (PostgreSQL) as a primary persistence provider (DB) for ThingWorx?

 

If yes, please note that PTC does not support AWS RDS as the primary persistence provider for ThingWorx 9.X. For detailed information, kindly refer to this KB article.

  • Notes:
    • AWS databases can be used as secondary databases to store IoT data collected by ThingWorx.
    • To use AWS databases as secondary databases, please follow the instructions provided in the article How to Connect to Database in ThingWorx.
       

Additionally, for more details regarding the compatibility of ThingWorx Platform 9.7.0, please review this release advisor.
 

Best regards,
Abhi

View solution in original post

5 REPLIES 5

I’d first try to verify my JDBC settings via something like this: https://medium.com/datamindedbe/connecting-to-databases-using-jdbc-from-the-cli-d2f5b1c30f5d

The fact that psql works doesn’t tell much, as it uses a different driver under the hood.


Vilia (my company) | GitHub | LinkedIn

 I followed CS357876 and validated connectivity from the same ThingWorx EC2 (Ubuntu 22) host. All the below checks are successful, which indicates the RDS endpoint is reachable, DNS resolution is working, and PostgreSQL accepts connections using the same network path:

 

psql -h <RDS_ENDPOINT> -p 5432 -U <DB_USER> -d <DB_NAME> "sslmode=require"
nc -vz <RDS_ENDPOINT> 5432
nslookup <RDS_ENDPOINT>

 

I suggest you validate your *JDBC connection string*, not connectivity. Since you blurred it out, we don’t know if the syntax is valid, if there are any extra flags like ssl, etc. Besides, JDBC uses a different Postgres driver.

Vilia (my company) | GitHub | LinkedIn

This is the JDBC connection string was using

"jdbcUrl": "jdbc:postgresql://<PostgreSQL Host>:5432/<PostgreSQL Database>?ssl=true&sslmode=prefer"

 

Hello @Rajkumar_20673
 

I hope you are doing well.
 

Are you using AWS RDS (PostgreSQL) as a primary persistence provider (DB) for ThingWorx?

 

If yes, please note that PTC does not support AWS RDS as the primary persistence provider for ThingWorx 9.X. For detailed information, kindly refer to this KB article.

  • Notes:
    • AWS databases can be used as secondary databases to store IoT data collected by ThingWorx.
    • To use AWS databases as secondary databases, please follow the instructions provided in the article How to Connect to Database in ThingWorx.
       

Additionally, for more details regarding the compatibility of ThingWorx Platform 9.7.0, please review this release advisor.
 

Best regards,
Abhi

Announcements


Top Tags