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

TWX Flow unavailable, High CPU Load

SOLVED
Highlighted
Amethyst

TWX Flow unavailable, High CPU Load

Hello,

 

I have a setup with TWXFlow (8.5.4) on a unix Server (CentOS 8).

The installation of TWX Foundation was straight forward and it works.

But the TWX Flow app is, after a while, not responding in Browser.

 

And on the server itself 3 Flow Services have a very high CPU Load.

Chrischhan_0-1586244276662.png

pm2 monit

 

There is only one Flow configured which does nothing (created flow and added 3 nodes, same behavior without any flows)

The logfiles show nothing for solving this problem. Are there any other troubleshooting possibilities to get flow running correctly?

 

EDIT: the Memory usage for the 3 Services grows upt to ~550 MB per Service

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: TWX Flow unavailable, High CPU Load

Hello everyone,

 

Flow is running smoothly.

 

i fixed the problem by uninstalling Flow and some dependent Software (which is installed by the installer) and reinstalled flow

 

i have taken the following steps to uninstall Flow:

  • delete Flow installFolder (/opt/ThingWorxFlow)
  • remove RabbitMQ (via paket manager, yum)
  • remove Chef (via paket manager, yum)
  • remove NodeJS (via paket manager, yum)
  • remove Flow service File (in /etc/systemd/system)
  • remove 2 links in /usr/local/bin/flow_dbg and flow_deploy
  • EDIT: drop database schema for flow (Thanks @slangley)

i hope i have listed all steps

 

View solution in original post

5 REPLIES 5
Highlighted

Re: TWX Flow unavailable, High CPU Load

Hi,

 

Could you add pm2 logs here to take a look?

 

Thanks,

Raluca Edu

Highlighted

Re: TWX Flow unavailable, High CPU Load

here are the Logfiles

i have removed the ones without any content.

The file flow-exchange-error-2.log is realy big (~45MB), also not attached, but there is one message block over and over and over again:

 

{ TimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    at Bluebird.try.then.catch (/opt/ThingWorxFlow/modules/exchange/node_modules/knex/lib/client.js:318:17)
    at tryCatcher (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/util.js:16:23)
    at /opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/catch_filter.js:17:41
    at tryCatcher (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues (/opt/ThingWorxFlow/modules/exchange/node_modules/bluebird/js/release/async.js:15:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5) sql: undefined, bindings: undefined }

 

 

Highlighted

Re: TWX Flow unavailable, High CPU Load

Hello everyone,

 

Flow is running smoothly.

 

i fixed the problem by uninstalling Flow and some dependent Software (which is installed by the installer) and reinstalled flow

 

i have taken the following steps to uninstall Flow:

  • delete Flow installFolder (/opt/ThingWorxFlow)
  • remove RabbitMQ (via paket manager, yum)
  • remove Chef (via paket manager, yum)
  • remove NodeJS (via paket manager, yum)
  • remove Flow service File (in /etc/systemd/system)
  • remove 2 links in /usr/local/bin/flow_dbg and flow_deploy
  • EDIT: drop database schema for flow (Thanks @slangley)

i hope i have listed all steps

 

View solution in original post

Highlighted

Re: TWX Flow unavailable, High CPU Load

Hi @Chrischhan.

 

Just to add to your steps, you would also need to drop the Flow database/schema.

 

If installing Flow on a pre-existing ThingWorx instance, care should be taken to ensure the ThingWorx implementation is not impacted when removing Flow.  Adequate backups or snapshots should be taken to ensure a successful recovery if needed.

 

Regards.

 

--Sharon

Highlighted

Re: TWX Flow unavailable, High CPU Load

Thanks for the additional Step!

 

Backup is always mandatory. Never without backups!

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!