Re: Excessive resource usage
Date: Wed, 19 Mar 2008 06:48:18 -0800
Szentpétery István wrote:
This is a resource issue not really curl issue but...
You are talking about time, they are talking about memory usage. You claim
the script use 4.5 MB peak but maybe your provider is averaging memory
use over time or something.
a cron job that runs for 5 minutes every 10 minutes would seem to me
likely to be a hog in some way. If I
were you I would call my provider and talk to them and ask for specific
opitmize suggestion to get resource
usage down. perhaps some caching of the pages you get with curl or
perhaps streaming so you don't have whole file in memory at once.
Without knowing what your app is doing its hard for me to be more
specific than that. but whenever I have problem like that I find what
the hog component is and find some less resource intensive way to do it.
> I'm running a php script whit cronjob on a server every 10 minutes, and
> the script is suposed to run maximum 5 minutes, and I get this error
> message from my provider :
> Time: Mon Mar 17 17:20:17 2008
> Account: accountname
> Resource: Virtual Memory Size
> Exceeded: 185 > 100 (MB)
> Executable: /usr/local/bin/php
> Command Line: /usr/local/bin/php -q
> PID: 23067
> Killed: No
> this script maximum memory usage is 4.5 MB, tested whit :
> The script is running 5 minutes i set it whit : set_time_limit(300); and
> ini_set('max_execution_time', 300); because in the past i got letters
> white execution time exceed.
> I'm using curl in the script to get another page content.
- text/x-vcard attachment: platypus.vcf