Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for October 16th, 2007

    GoDaddy: undocumented 20-second CPU time maximal execution limit? (python, ELF, etc)

    16th October 2007

    Today, setting up a relatively serious (in CPU resources needed) web-system, I ran into a weird problem of python scripts ending prematurely. After some investigation, it looked like any process which uses up more than 20 seconds of CPU time, is automatically killed. To verify this, I wrote an infinite loop in C,

    int main () {
    unsigned int i;

    for (i = 0; i < 2 ; i++ ) { i = 0; } return 0; } [/c] compiled it and executed several times on the GoDaddy shared hosting server. I did observe the program running for the maximum of 20 seconds of CPU time, not a second more. Please note, that 20 seconds of CPU time can be much more of “real” time, if the script isn’t using 100% of CPU, which often the case for shared hosting. Thus if you have in your php.ini max_execution_time set to, say, 60 seconds, your php script may actually execute as long as one minute; but I’m pretty sure that if your script has lots of CPU-intensive procedures, then as soon as it uses 20 seconds of CPU time, it will be terminated (however, this statement still needs checking – anyone?). To verify, I also created a cron job with the same file. It ran for 30 seconds CPU time. Strangely, this behaviour is not documented anywhere. This limit may also explain a number of other problems, if you have heavy web-applications: they just might be killed before they are finished, causing errors. I do understand the reason for this limitation, and am sure similar limitations exist in other shared hosting environments. The only important thing here is that this limit should have been documented and even put upfront somewhere in the hosting plans descriptions. I also wonder if the limit is the same for all godaddy shared hosting plans, or if it differs. 20 seconds when executed from PHP, and 30 seconds when executed as a cron job were observed on the Deluxe Linux Hosting plan. Extensions, additions and comments are welcome.

    Share

    Posted in *nix, Misc, Programming, Web | 22 Comments »

    Final snap elections results: Socialists out, Lytvyn in

    16th October 2007

    My expectations were half-satisfied: Socialists didn’t make it into the parliament! Great lesson for them, and a new example of political death in Ukraine. (Though I do think that Socialists have resources to return in 5 years, when new elections are due.)

    On the other hand, Lytvyn’s block did jump the 3% barrier. By the way, if we take the absolute number of votes Lytvyn had in 2006 elections (619 905 votes), and the number he had at the 2007 snap elections (924 538), the difference is only 304633 votes. When multiplied by 20$, it gives 6 million USD – which isn’t too high a price for getting into the parliament, isn’t it?

    Overall, I’m satisfied with these elections. Politicians this time were wise enough to avoid prolonged court trials over the miserable, non-differentiating numbers of votes in distinct voting districts. It saved both time and money. It’s also good to hear that immediately after the official results announcement, the Our Ukraine – Self Defence block and the Block of Yulia Tymoshenko agreed upon the coalition treaty. It’s not yet evident if the treaty will hold, or if it won’t be beaten by the PR – Lytvyn – Communists probable political block – but that is still a good sign of political agility, unseen since the end of 2004 between the two political forces.

    I’m also glad that society intelligently handled these elections, which were unfavoured by many. Everything went overall smooth and with no troubles.

    The only thing, which is not directly elections-related, is the fighting over the status and interpretation of the OUN-URA (Organisation of Ukrainian Nationalists – Ukrainian Rebel Army) during the World War II. But I hope that in part with the help and actions by the President, this issue will be settled and finally resolved as soon as possible (I expect this to happen within 10 years from now).

    Share

    Posted in Society | No Comments »