Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


File too big for cronjob or problem with cronjob?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

File too big for cronjob or problem with cronjob?

Hello,

i have a problem..i have a dedicated server and i have 3 cronjob but file dimension for each are 6MB and need to update price and quantity in shop client (150k products)
Cronjob take really too much time...
i increase max_input_time for not crash server but now take too much long..seem stacked...

what i can do?

I use plesk

Comments

  • TomBGTomBG Member
    edited January 2021

    It is about php, right?
    Increase max_execution_time.
    Or better optimize your code :)

    Thanked by 1chiccorosso
  • split the product to less files, let say 40-50k per cronjob.

  • Instead of running cron jobs , why not do the following:

    1.Update your code to use queues.A job will update the price & quality for one single product Id
    2. Use supervisor and workers to pick from the queue and perform the update

    Ofcourse you can increase the number of workers based on how much you server can handle.

    Thanked by 1chiccorosso
  • isunbejoisunbejo Member
    edited January 2021

    call script with bash, example with php :

    #!/usr/bin/env bash
    php /path/script.php &
    
  • My dev improve code and now work good

Sign In or Register to comment.