task scheduler issues

Nir Ben-Dor's Avatar

Nir Ben-Dor

10 May, 2018 11:14 AM

Hi,

Some of the scheduled tasks take 20mins+ instead of 2 minutes.
I know you are aware of the problem.
What can be done to mitigate it?
This is critical for our functionality

Thanks,
Nir

  1. Support Staff 1 Posted by Vitaliy Demidov on 15 May, 2018 11:33 AM

    Vitaliy Demidov's Avatar

    The script that takes 20+ minutes contains a single command:
    curl --silent --compressed http://%internal_ip%/cron/cron.php?current_farm=1 It looks like Scalr has no control over cron.php process. Can you elaborate what causes this script to execute too long. You can also add debug log how much time takes each operation from that script. It might be overall load or database/file lock at some point.

  2. 2 Posted by Nir Ben-Dor on 22 May, 2018 04:28 PM

    Nir Ben-Dor's Avatar

    Hi Vitaliy,

    We expect the script to run longer than two minutes sometimes. Our code checks and if there is a call to the script while another one of the same type is running it will return.

    Could you tell me what is wrong with this and how it effects scalr?

    - Nir

  3. Support Staff 3 Posted by Marat Komarov on 22 May, 2018 07:00 PM

    Marat Komarov's Avatar

    Make sure that all long-running tasks are configured as non-blocking in Scalr task scheduler. I see that some of them are blocking. When the task is blocking, Scalarizr waits for its completion before peeking the next one.

  4. 4 Posted by Nir Ben-Dor on 23 May, 2018 09:40 AM

    Nir Ben-Dor's Avatar

    Thanks for the explanation. Now I understand the problem. Working on it.
    You can close the ticket.

    - Nir

  5. Marat Komarov closed this discussion on 23 May, 2018 06:26 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac