Restart Sub Application after loss database connection

Hi team,

I am looking for information on how to restart a sub-application that failed to start.

We currently have 3 sub-applications. They were running normally until they suddenly lost their connection to the database. I restarted the entire main application, but one of the sub-applications is still failing to start.

Could you please point me to where the database credentials for these sub-applications are stored?

Environment details:

  • NocoBase version: 1.9.47
  • OS: Ubuntu 24
  • Installation method: create-app

Thanks in advance for your help.

Hello!
The sub-application’s database is in the same database program as the main application’s database. Use a tool to connect to the database and check if the database exists.

Please provide the log file from February 28th.
Log file location: storage\logs\main (request_xxx, system_xxx, system_error_xxx, sql_xxx)
Online log file management address: admin/settings/logger

Hi

Here is the full context of what happened and the steps I’ve taken:

The Incident: Originally, I had three sub-applications running perfectly (one of them being mantenimientotmb and another bitacora). Last Thursday, we experienced a sudden loss of connection to the databases. When I tried to restart NocoBase, it threw errors stating it could not find the mantenimientotmb and bitacora databases. However, it’s important to note that these are actually schemas, not full databases.

Troubleshooting Steps Taken:

  1. I attempted several times to fix the issue using nocobase db:sync, but it was unsuccessful.
  2. I then decided to upgrade from v1.9.15 to v2.0.3. This did not resolve the issue; the connection errors to the schemas persisted, and I could still only access the main application.
  3. I rolled back the NocoBase VM (not the database) to its initial state before the 2.0.3 upgrade, but the sub-apps still refused to start.
  4. Finally, I upgraded to version v1.9.47.

Current Situation on v1.9.47:

This is where the behavior becomes unusual:

  • If I try to start the application using yarn nocobase start or yarn nocobase start -d, the connections to the sub-applications do not initiate. Only the main application works.
  • However, if I start the app using PM2 with the following command: pm2 start "yarn start" --name nocobase …the application starts, and the mantenimientotmb the bitacora and proyectos sub-applications* are successfully connects and works*.

My Questions:

  1. Could you please point me to where the database credentials/connection strings for these sub-applications are stored in this version? I need to verify if their configurations are corrupted.
  2. Can you explain why the standard yarn commands fail to start the sub-apps, but using PM2 allows at least one of them to start correctly?

Environment Details:

  • NocoBase version: 1.9.47
  • OS: Ubuntu 24
  • Installation method: create-app

I have the logs for the failing sub-applications ready. [Note: Attach the logs you mentioned before sending].

This is the DB.
image

Those are the backlogs requested.
logs 27-02 (request, system, system_error, sql).tar.gz.zip (3,2 MB)

Aditional info. The version reported by PM2 is 1.9.15, while the Nocobase version is actually 1.9.47.


image

Thanks in advance for your help and guidance.

Hello!

Did this problem occur after the upgrade? Have the NocoBase environment variables been changed?

Hi.

No, the problem occurs randomly (once 1 every 1 to 3 moths) during normal operation. This issue originates from version 1.3.5 (Multiapp does not work · Issue #5154 · nocobase/nocobase · GitHub).

Regards