PDA

View Full Version : 5 questions - max timeout & customer service


Unregistered
6th May 2003, 03:20 PM
I have some questions regarding CPU utilization and php's "set_max_timeout" function.

My web site uses a php script to batch process order information, which executed via command-line php from crontab.

I had to use set_max_timeout to increase the default timeout for the php script because it look longer than the default of 30 seconds to execute.

Rochen's AUP states:
a) Run any process that requires more than 5Mb of memory space, more than 15 CPU seconds, or use more than 5% of all available system resources at any time.

I'm wondering:

1) Will I be able to use the set_max_timeout() php function, or is it disabled on Rochen unlimited hosting accounts?

2) If my script runs for, say, two minutes (max), is that in violation of the AUP?

3) Does 1 "CPU Second" always = 1 real time second that a script is executing?

...and just for my piece of mind...

4) Is there any reason that US customers shouldnt use an ISP that is based outside of the US?

5) Do you have a 1-800 number for customer support, or is all support conducted through Rochen's web site?

thanks,

-jonathan

Unregistered
6th May 2003, 03:24 PM
oops, the name of the function in question is set_time_limit, not set_max_timeout ( http://www.php.net/manual/en/function.set-time-limit.php )

Thanks,

-jonathan

Chris
6th May 2003, 05:11 PM
Originally posted by Unregistered
I1) Will I be able to use the set_max_timeout() php function, or is it disabled on Rochen unlimited hosting accounts?
No, this is a server-wide setting that can't be changed in php.ini.

Originally posted by Unregistered
2) If my script runs for, say, two minutes (max), is that in violation of the AUP?
Yes

Originally posted by Unregistered
3) Does 1 "CPU Second" always = 1 real time second that a script is executing?
Yes

Originally posted by Unregistered
4) Is there any reason that US customers shouldn't use an ISP that is based outside of the US?
Not that I can think of :) All our servers are in the US and we have many support staff members based in the US :)

Originally posted by Unregistered
5) Do you have a 1-800 number for customer support, or is all support conducted through Rochen's web site?
Support is either via these forums or our secure helpdesk system. All tickets are normally answered in under an hour :)

If there's anything else, please let me know... :cool:

jonathany
6th May 2003, 06:03 PM
Thanks for the quick response.

I'm wondering how we can write our scripts so they will be compatible with Rochen's AUP... maybe our current server is simply so slow that it takes that long for scripts to complete.

For our record store, we have two scripts, one that generates dailiy email alerts (and runs fairly quickly). The other runs once a week and does something like amazon's "if you liked x you might like y" feature. It takes up to a minute to run.

We want to continue to have these features available if we switch to rochen.

Is it possible to set the priority of a cron job so that it executes more slowly, using only free CPU cycles, or something?

it should be noted that these are PHP scripts, not Perl.. does that make a difference? (is PHP slower to execute?)

-jonathan

Chris
6th May 2003, 06:06 PM
There isn't really anyway for me to give a definite answer to the question. However, you may want to look into processing the email list etc. in smaller batches and have intervals in between.

jonathany
6th May 2003, 09:33 PM
Well, I went ahead and signed up. We'll see how it goes. I'm curious to know (1) if my scripts are going to get killed and my account terminated the moment they run over 15 seconds automatically, or if I'll be notified first.

Also, if I have an Unlimited Domain account, (2) will ALL domains I own be suspended, or just the one that is offending?

The AUP seems a little vauge when it talks about script execution.. you said I should process the data in smaller junks and the script should not exceed 15 seconds in execution time... what if numerous scripts run back to back for more than 15 seconds? How much delay is needed between each script execution, etc...?

(3) Is there any 'special treatment' for cronjobs that run Nightly or Weekly?

I know that the intention of the AUP is to keep a small number of clients from consuming a great deal of resources and I'm not trying to get a free ride, but I would like to understand the parameters of what is acceptable and what is not since I'm going to have to code to those standards.

thanks,

-jonathan

PS, if you feel like processing my order now, the Agreemnt ID is 613007. :) thanks

Chris
6th May 2003, 09:43 PM
Originally posted by jonathany
(1) if my scripts are going to get killed and my account terminated the moment they run over 15 seconds automatically, or if I'll be notified first.
It depends when we pick it up...

Originally posted by jonathany
Also, if I have an Unlimited Domain account, (2) will ALL domains I own be suspended, or just the one that is offending?
Just the offending site, it would be unfair to terminate all the sites. We realise people depend on their reseller accounts to run their businesses and if they had a naughty client, it would be unfair for the whole account to be closed :)

Originally posted by jonathany
(3) Is there any 'special treatment' for cronjobs that run Nightly or Weekly?
Nope, but we would proffer if you could run them at 3 - 5am EST. as that is generally when the servers have the least loads.