max_execution_time limited?

max_execution_time limited?

Posted by: greenman
Posted on: 2008-09-04 19:02:00

I created a site using epiware just to check it out. It's got a lot of quirks, but I've been able to make it work. I had to make my own php.ini in order to stop the "Call-time pass-by-reference has been deprecated" errors in php, which works, for the most part, but when I test for max_execution_time, the script tells me php.ini has it set for "30" not "300".

This to me says that Dreamhost may be governing max_execution_time another way than php.ini

I'm using the cgi wrapper method for php found here:
http://wiki.dreamhost.com/Talk:PHP.ini

Can anyone confirm?

Re: max_execution_time limited?

Posted by: patricktan
Posted on: 2008-09-04 20:13:00

There is a popular article in wiki to teach people how to install their own php.ini file. Maybe you want to take a look
http://wiki.dreamhost.com/PHP.ini

Re: max_execution_time limited?

Posted by: greenman
Posted on: 2008-09-04 20:23:00

Hi Patrick,
Thanks for your reply.

Actually, I have read it.
I also read the discussion about php.ini, as evidenced by the wiki link in my original post.

No mention is made about max_execution_time.

Any ideas?

Re: max_execution_time limited?

Posted by: patricktan
Posted on: 2008-09-05 01:55:00

If you know how to install your own php.ini, it will be very easy to change max_execution_time. Just open your own php.ini and change max_execution_time = 30 (default) to max_execution_time = 300

Did I misunderstand your question?

Re: max_execution_time limited?

Posted by: greenman
Posted on: 2008-09-05 06:51:00

Well, last night, when I was trying out my install of php.ini, when I went to check whether it was working:
http://movable.activistinabox.org/cgi-bin/upload.php
Everything passed except for the "max_execution_time" which was still set to "30" even though my php.ini was set to 300.
http://movable.activistinabox.org/cgi-bin/php.ini.txt

I'm using the php5-wrapper.fcgi method, but I notice that when I 'top', I get three php.cgi processes as shown below.

Mem:   4075028k total,  3832452k used,   242576k free,   142796k buffers
Swap: 6313512k total, 708480k used, 5605032k free, 1417908k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9312 username 9 0 1660 1660 1224 S 0.0 0.0 0:00.06 bash
12070 username 9 0 1020 1020 844 R 0.0 0.0 0:00.02 top
27385 username 11 2 5708 5704 5512 S 0.0 0.1 0:00.03 php5.cgi
22623 username 11 2 6196 6192 5936 S 0.0 0.2 0:00.02 php5.cgi
3336 username 11 2 6612 6608 5652 S 0.0 0.2 0:00.06 php5.cgi

So I'm not sure if this is a violation of the TOS, even though it's suggested in the wiki.

In other words, there are now a few questions:
A. Last night, when I'd set the php.ini and used upload.php to test the settings, the only setting that wasn't showing correctly was the 300 for max_execution_time. It still showed as 30.

I was wondering if DH was governing max_execution_time from somewhere else, even though I'd created my own php.ini.

B. Is this method creating a persistent process?

C. How do I kill it if it is? 'k pid' doesn't seem to work. It just reestablishes.

When I came back this morning, the processes were gone from top and the site wasn't working until I tried upload.php a couple times. I actually got a Server Error the first few times.


Re: max_execution_time limited?

Posted by: greenman
Posted on: 2008-09-05 12:17:00

Just a follow up, in case anyone is interested.

Apparently, this type of persistent cgi is okay with the TOS. They go away after a while. I got that as a reply back from Greg R at DH support. Thanks Greg R!

From outside top, the processes could be killed by 'kill -9', but since it's not necessary, no worries.

Still no idea why max_execution_time wouldn't show as 300 last night when without changing any settings it does now. Very strange.

Tags: execution timecall timeini