Menu
SuiteCRM Pull Request Party hosted by SalesAgility
Welcome, Guest
Username: Password: Remember me

TOPIC: workflow job forever remains in "running"

workflow job forever remains in "running" 2 months 1 week ago #77502

  • huangzl888
  • huangzl888's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Hello Pro users

version: 7.11.0
PHP 7.1.26

I've created 20 over workflows, All of them works perfectly except One. I've attached the workflow screen shoot.

This workflow supposed to calculated how many days left before the contract expires.

It works, if i limit the the workflow to process less than about 100 contracts.

And if the contract volume increased to more than 100 or so, Job_Status will remain in the "running" status forever.


Please, i need some advise. (I have another workflow that calculate days left for "task", the logic is also the same, it works perfectly fine)

Thank you !
Attachments:
The administrator has disabled public write access.

workflow job forever remains in "running" 2 months 1 week ago #77504

  • huangzl888
  • huangzl888's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Just now forgot to mention that, I've checked all the 200+ contracts.

The workflow actually did ran for all contracts and updated all "days left before expire".

But i'm not sure why it is not update the Job_queue status to "done", This actually prevents all subsequent workflows to run properly
The administrator has disabled public write access.

workflow job forever remains in "running" 2 months 1 week ago #77576

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9533
  • Thank you received: 1436
  • Karma: 344
Hi

You can check the database table "job_queue" to clean-up the stuck job, so you can try again.

I don't know what could be causing it to hang, the best thing you can do is check both your logs at the time when the job runs.

You can also try increasing some of your resource limits in your php.ini:

memory_limit (try 512 mb)
post_max_size
max_input_vars
max_execution_time

then restart your web server.

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

workflow job forever remains in "running" 2 months 1 week ago #77598

  • huangzl888
  • huangzl888's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
I've found the reason why it fails.

contract has line items inside, which means there are currency and amount involved.

so when the workflow runs, it generates a lot of warnings: "A non-numeric value encountered in ***/modules/Currencies/Currency.php on line 100"

when the workflow completes, and try to update into database job_queue, this message exceeds the maximum allowable length for the job_queue table Message column.

Then it resulted in a job_queue entry update failure, then the job stuck in "running" for ever.



The walk around solution is to disable "MySQL Strict" mode. So database will drop the oversized Message, and allow job_queue to be updated.

But I don't think it is a longterm solution.


Can anyone suggest how to solve the warning: "A non-numeric value encountered in ***/modules/Currencies/Currency.php on line 100" ???
The administrator has disabled public write access.

workflow job forever remains in "running" 2 months 1 week ago #77606

  • pgr
  • pgr's Avatar
  • Offline
  • Administrator
  • Posts: 9533
  • Thank you received: 1436
  • Karma: 344
I opened an issue for the log problem (it's not the first time I heard of this):

github.com/salesagility/SuiteCRM/issues/6931

About the error "non-numeric" it seems to be reported here

github.com/salesagility/SuiteCRM/issues/6718

although I am not sure it is the same thing. Please have a look and comment there with any relevant info you might have.

Thanks

My SuiteCRM In-depth blog.
Thank you for always stating your SuiteCRM version, checking your logs, reading the Docs, and searching before you ask!
The administrator has disabled public write access.

workflow job forever remains in "running" 2 months 1 week ago #77620

  • tadhius
  • tadhius's Avatar
  • Offline
  • New Member
  • Posts: 7
  • Karma: 0
check php, for production should set memory limit in 256
The administrator has disabled public write access.

workflow job forever remains in "running" 2 months 1 week ago #77724

  • bryancn
  • bryancn's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
I had a similar problem with several workflow jobs that were stuck/running. I think I caused this by killing a php process that was sending me 100's of dummy emails because of logic flaw in a workflow.

I tried editing the status of the workflows and their queued jobs, restarted mysql, apache and finally the server, but to no effect. No obvious log messages…

In the end I worked around it by duplicating each affected workflow, disabling the old and enabling the new. The 'new' workflows worked perfectly.
The administrator has disabled public write access.
Time to create page: 0.056 seconds
Powered by Kunena Forum