fcgi & fcgid execution Time slow server

Hi I Use Virtualmin Pro and my Server is at the moment a little bit slow.
If I use “top” to Control the PHp execution I see Processes with “php-cgi” but in the server Templates the default mode is set to FCGId the Apache Modul is active the cgid is active too.
Deactivatet are cgi and fcgi. Runs Apache now with the fcgid when “top” shows me “php-cgi”?

Ans how can I setup the execution time? In the php settings from the Virtual severs Ic sets excecution Time for testing to 90 & 360 but i think the seueccec an fcgid execution time stays at 30 or 60.

Please Help me

Howdy,

Yeah, both FCGI and CGI execute the same binary, /usr/bin/php5-cgi (or /usr/bin/php-cgi, depending on your distro) when they run.

The difference is that FCGID keeps the process in memory and caches it, so that future runs occur quicker.

How much RAM do you have in your system – for example, what is the output of “free”?

Also, can you run “ps auxw”, and attach the output as a file to this thread?

As far as changing the execution time goes, you should be able to modify that by increasing the maximum PHP script run-time Server Configuration -> Website Options.

-Eric

Okay, that much looks good… what is the output of the “free” command, and the “uptime” command?

-Eric

Ok Here is my Output,
at the moment the Server can use 1500 MB Ram.
Thanks Pierre

What do you think about it.
In my php5 directory I have only directorys for cli, cgi an apache and conf.d.
But there is no directory for fcgi.
Is this Ok?

And somthing other to this Problem, I get Apache Errors like:
un Jan 10 16:31:26 2010] [warn] mod_fcgid: read data timeout in 31 seconds
[Sun Jan 10 16:31:26 2010] [error] [client 92.78.99.229] Premature end of script headers: index.php, referer: http://www.XXX.php?

How can i change the execution Time?
In the User acounts I set up the execution Time but the 31 Seconds error stays.

Thanks Pierre

it. In my php5 directory I have only directorys for cli, cgi an apache and conf.d. But there is no directory for fcgi. Is this Ok?

Yup, that’s typical.

As far as your execution time goes – did you set that by changing the Maximum PHP script run-time Server Configuration -> Website Options?

-Eric

Ok this helps me as a Workaround.
I think, the best what i can do to take a faster machine.

Thanks, Pierre

Ok I set up the execution time to 90 and change Msql Values:
query_cache_limit = 2M
query_cache_size = 64M
query_cache_type = 1
table_cache = 256
Increase key_buffer
key_buffer_size = 64M

Now I made a load test, but I seems good.

Pierre

Hello all!

I had this same problem and managed to solve updating my PHP to version PHP 5.4

Currently, to install PHP 5.4 on ubuntu is possible using the repository https://launchpad.net/~ondrej/+archive/php5

But I warn you, it worked perfectly on a clean install of Ubuntu 11.10 risking if you install on production server, you may have problems.

These are the steps:

sudo add-apt-repository ppa:ondrej/php5

sudo apt-get update

sudo apt-get install php5

You can check if PHP 5.4.0 is successfully installed with this command:

php5 -v

That’s it!