unix

Displaying 1 - 3 of 3

Debugging and troubleshooting cron jobs

Usually when I have mysterious problems with a new crontab, it's that I'm not getting any results or output as expected, as if the command didn't run at all. Almost always, the newly added line to crontab was run. What did it do, what was the output, when did cron run? What should we check for?

  • Rarely, there is a problem in the time/data fields. The fields are:

    • minute
    • hour
    • day of month
    • month
    • day of week
    • then the command

    So make sure there are exactly 5 numbers or stars () before the command. Then

  • ...

Solve mysterious Drupal initial page load delay with cron

Sometimes you'll visit your Drupal site in the morning, or after logging in as admin for the first time in awhile, and the page will take forever to load, more than 30 seconds, even longer. (First, if you're using Cloudflare CDN, it could be a problem with their servers not sending the end of the page html when it's finished and thus causing the browser to hang for a long time.)

The main cause of this kind of page load lag is Drupal's cron task! There are two ways that Drupal will run cron. The first is when you trigger it externally (by pinging the cron.php url,...

More virtual memory in Mac OS X

Virtual memory is the RAM that processes see when they're running, the memory space which the operating system allocates to them. The memory is called virtual because the addresses don't necessarily conform to physical memory addresses of the RAM hardware but instead the same address could refer to any number of possible physical addresses. It's up to the OS and the memory hardware to resolve the virtual address to a physical address, and do so transparently to each process.

Virtual memory can also refer to the data which was stored in physical memory but "paged out" to disk. The...