Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Cron Jobs Crashing Server?

    Hi guys,

    I'm pretty sure what's happening is my cron jobs are crashing my server. At times I see the system has 6 or 7 open.

    My business is to syndicate my customerís content into our community and I do this with a cron job and an rss importer.

    I think what happens is they stay open or get stuck and then other start running because they are based on ever 1 3 5 7 9 etc minutes. My Load Average can even hit 50.00, I have about 70 customers and around 150 feeds.

    Is there any code to use is SSH that can clear all open and active or stuck cron job? I used the following but the server load is still insane...

    service crond restart

    any help would be awesome, also is there anyway to see how many cron jobs are running at one time?


  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    That sounds a lot like race conditions and overlapping calls.

    1) How long does each cronjob run?
    My suspicion is, that it takes longer than 2min.

    2) Is it safe to run multiple of these crons concurrently?
    It is not, if they have:
    - the same non-static input
    - the same output file or non-transactional database
    - same temp or working directories/files

    3) If they are not designed to overlap:
    Is there locking in place?

    4) What ressoures are used?
    Maybe IO, CPUs and/or network are saturated.
    Maybe the crons are waiting for a DB or webservice call to return.

    5) What are the specs of the machine and especially: where are the inputs?
    Same machine, maybe even same spindles? Or somewhere on the net?

    6) For my personal taste: Everything running more often than every 5min shouldnt be a cron, but a standalone daemon.
    Also the implementation should shift from scripting to a "real" programming language.

    In short: Investigation and information is needed on what actually is happening before advice can be given.
    You must always face the curtain with a bow.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts