Hello Pro users
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 !
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
11 February 2019 10:28
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)
then restart your web server.
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” ???
11 February 2019 17:32
I opened an issue for the log problem (it’s not the first time I heard of this):
About the error “non-numeric” it seems to be reported here
although I am not sure it is the same thing. Please have a look and comment there with any relevant info you might have.
check php, for production should set memory limit in 256
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.