I have a CRON job calling a PHP script using wget; I've set it up like that as I have all the objects set up and can be used elsewhere in the site.
Calling this PHP script by typing in the address the script runs with no problems; it's not a particularly long running process, around 6 seconds (max). However running with the CRON job, one of the MySQL processes runs upto 100% CPU and kills the responsiveness on the rest of the server. The exception that I receive is a mixture between 'too many connections', 'query execution was interrupted' and 'can't connect to local server through socket..'. I suspect all symptomatic of the 100% CPU usage. I can't kill the process, I have to (soft) restart the server.
The CRON call is the following:
*/10 * * * * /usr/bin/wget --user-agent="MyWebsite.com" --quiet --tries=0 -O - http://www.example.com/cron/script?password=example
Could this be DOSing my server?
- Update: Just to say that the script sometimes runs for a little while (max 24 hours) and sometimes as little as a few minutes.