Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue - worflow process generating high CPU process #3500

Closed
raramuridesign opened this issue Nov 5, 2023 · 12 comments
Closed

issue - worflow process generating high CPU process #3500

raramuridesign opened this issue Nov 5, 2023 · 12 comments

Comments

@raramuridesign
Copy link

PHP version: 8.2.x
FreeScout version: 1.8.107
Database: Mysql
Are you using CloudFlare: Yes

@freescout-helpdesk
We have noticed that the CPU levels when workflows are running seems to be abnormally high.
Nothing unusual has been added to the workflows, but we do have a few rules which have a lot of items to check.

Questions
Is it normal for the processes to be running for such a long time?
Why would they consume so much CPU processes?
Can they be self terminated? As it looks like they have issues or cannot finish after a certain time.

Your thoughts
M.

image

@freescout-helpdesk
Copy link
Owner

Also send screenshot of the Workflow settings and conditions.

@raramuridesign
Copy link
Author

I already did that...

@freescout-helpdesk
Copy link
Owner

Depending on condition types used workflows may need to scan all threads/conversations in DB.
How many conversations and threads do you have in DB?

@raramuridesign
Copy link
Author

@freescout-helpdesk We have 75.000 messages which are closed. Possibly more in terms of threads.

@freescout-helpdesk
Copy link
Owner

freescout-helpdesk commented Nov 5, 2023

Try to execute the following console command and check how much time it takes for it to finish:

php artisan freescout:workflows-process

@raramuridesign
Copy link
Author

raramuridesign commented Nov 5, 2023

@freescout-helpdesk been running for 40 minutes now. Still busy and the CPU is hitting 65-75%
workflow process is consuming on average 55-70%

@freescout-helpdesk
Copy link
Owner

freescout-helpdesk commented Nov 5, 2023

Try to kill already running "freescout:workflows-process" processes and run the console command again.

@freescout-helpdesk
Copy link
Owner

Disable all wokflows and enable them one-by-one running "freescout:workflows-process" command to find out which workflow takes time to process . After that send us that workflow's settings and conditions.

@freescout-helpdesk
Copy link
Owner

And make sure everything is ok on Manage > Status page, especially pcntl extension.

@freescout-helpdesk
Copy link
Owner

Also try to set "Max Executions" parameter to 1 for all other workflows and run "freescout:workflows-process". Maybe you've configured an infinite loop with your workflows. See "Max Executions and Workflows Infinite Loop" section at https://freescout.net/module/workflows/ for more details.

@raramuridesign
Copy link
Author

@freescout-helpdesk

  • pcntl is intalled - no issues
  • we had one workflow which had max execution set to 5 -This is now 1.
    Will monitor the processes now.

@freescout-helpdesk
Copy link
Owner

Closing for no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants