Author |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 12 Feb '07 7:45 Post subject: Wierd Error... Processes Not Dying... |
|
|
In CGI mode or the other mode I already get processes which don't end...
Here is an example of two CGI processes which just won't finish... There only two loaners here but it will go up to 50! and then crash...
When this happens it builts up with 1 2 3 4 5 till all 250 places or how many threads i have are in use and no pages will go or I'll have memory errors...
error.log has...
[Sun Feb 11 23:01:14 2007] [crit] [Sun Feb 11 23:01:14 2007] file D:\\asf-build\\build-2.0.59\\server\\mpm\\winnt\\child.c, line 1078, assertion "(rv >= 0) && (rv < threads_created)" failed
[Mon Feb 12 00:33:00 2007] [crit] [Mon Feb 12 00:33:00 2007] file D:\\asf-build\\build-2.0.59\\server\\mpm\\winnt\\child.c, line 1078, assertion "(rv >= 0) && (rv < threads_created)" failed
I have a bunch more of these... |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 12 Feb '07 14:46 Post subject: |
|
|
You can set
ProcessLifeTime 240 |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 12 Feb '07 17:59 Post subject: |
|
|
The problem is I want to run PHP as a module... But the processes still lock up... I just put it to CGI to show how they lockup... It could be any page which loads which causes it... Totally random...
ProcessLifeTime 240 will only work with FastCGI. Is there such a thing which exists if I want to run PHP as a module system? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 12 Feb '07 18:35 Post subject: |
|
|
the modul do NOT start php-cgi.exe
How did you set up the php module in httpd.conf |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 12 Feb '07 19:00 Post subject: |
|
|
ScriptAlias /php/ "D:/Apache Group/PHP/"
AddType application/x-httpd-php-cgi .phpcgi
Action application/x-httpd-php-cgi "/php/php-cgi.exe"
SetEnv PHPRC "D:/Apache Group/PHP/php.ini"
LoadModule php5_module "D:/Apache Group/PHP/php5apache2.dll"
AddType application/x-httpd-php .php
PHPIniDir "D:/Apache Group/PHP/php.ini"
---
PHPCGI scripts will have PHP processes not end...
PHP MODULE scripts will have it's threads go down by about 1 every 5 minutes (they lock up) until I get memory errors and eventually no pages will load because 0 threads are looking for incoming connections...
If i restart apache threads will show from 500 to 490 to 480... And it eats up a lot of memory...
I thought downgrading to Apache 2.0.59 would solve the problems (I was using your version 2.2.4 before)... Same problems...
Should I put the ProcessLifeTime 240 inside of the virtual host? Apache does not start... While looking it up, it seems like the value should go in the fcgi module (which I don't use).
<VirtualHost 82.165.161.46:80>
ServerName rave.ca
ServerAlias *.rave.ca
ServerAlias raves.ca
ServerAlias *.raves.ca
ServerAdmin webmaster@rave.ca
DocumentRoot D:\Websites\ravewave.com\website
ErrorLog D:\Websites\ravewave.com\logs\error.log
php_admin_value open_basedir "D:\Websites\ravewave.com;C:\Windows\Temp"
php_admin_value doc_root "D:\Websites\ravewave.com"
php_admin_value user_dir "D:\Websites\ravewave.com"
<Directory D:\Websites\ravewave.com\website>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "D:\Websites\ravewave.com\website\data\music">
Order Deny,Allow
Deny from All
</Directory>
RewriteEngine On
RewriteRule ^/full/(.*).[png|jpg|gif]$ http://www.rave.ca/?g=full&i=$1 [L]
</VirtualHost> |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 12 Feb '07 19:14 Post subject: |
|
|
If i restart the server... Here the logs...
[Mon Feb 12 11:00:19 2007] [notice] Child 3524: Waiting for 499 worker threads to exit.
[Mon Feb 12 11:10:17 2007] [notice] Child 3524: Waiting for 496 worker threads to exit.
[Mon Feb 12 11:20:16 2007] [notice] Child 3524: Waiting for 492 worker threads to exit.
[Mon Feb 12 11:30:12 2007] [notice] Child 3524: Waiting for 487 worker threads to exit.
[Mon Feb 12 11:40:22 2007] [notice] Child 3524: Waiting for 484 worker threads to exit.
Always with:
[Mon Feb 12 12:00:19 2007] [crit] [Mon Feb 12 12:00:19 2007] file D:\\asf-build\\build-2.0.59\\server\\mpm\\winnt\\child.c, line 1078, assertion "(rv >= 0) && (rv < threads_created)" failed |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 12 Feb '07 20:16 Post subject: |
|
|
I changed to this, I'll let you know how it is... i think it's the proper setup...
httpd.conf:
LoadModule fcgid_module modules/mod_fcgid.so
ScriptAlias /php/ "D:/Apache Group/PHP/"
AddType application/x-httpd-php-cgi .phpcgi
Action application/x-httpd-php-cgi "/php/php-cgi.exe"
SetEnv PHPRC "D:/Apache Group/PHP/php.ini"
DefaultInitEnv PHPRC "D:/Apache Group/PHP/php.ini"
DefaultInitEnv PATH "D:/Apache Group/PHP;C:/WINDOWS/system32;C:/WINDOWS;"
DefaultInitEnv SystemRoot "C:/Windows"
DefaultInitEnv SystemDrive "C:"
DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
DefaultInitEnv TMP "C:/WINDOWS/TEMP"
DefaultInitEnv windir "C:/WINDOWS"
LoadModule php5_module "D:/Apache Group/PHP/php5apache2.dll"
AddHandler fcgid-script .php
PHPIniDir "D:/Apache Group/PHP/php.ini"
vhost:
<VirtualHost 82.165.161.46:80>
ServerName rave.ca
ServerAdmin webmaster@rave.ca
DocumentRoot D:\Websites\ravewave.com\website
ErrorLog D:\Websites\ravewave.com\logs\error.log
php_admin_value open_basedir "D:\Websites\ravewave.com;C:\Windows\Temp"
php_admin_value doc_root "D:\Websites\ravewave.com"
php_admin_value user_dir "D:\Websites\ravewave.com"
<Directory D:\Websites\ravewave.com\website>
FCGIWrapper "D:/Apache Group/PHP/php-cgi.exe" .php
Options ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory "D:\Websites\ravewave.com\website\data\music">
Order Deny,Allow
Deny from All
</Directory>
RewriteEngine On
RewriteRule ^/full/(.*).[png|jpg|gif]$ http://www.rave.ca/?g=full&i=$1 [L]
</VirtualHost>
Last edited by Thog on Mon 12 Feb '07 23:10; edited 2 times in total |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Mon 12 Feb '07 22:49 Post subject: Rogue Processes |
|
|
You can see a bunch of rogue PHP-CGi processes on the bottom which form outside of apache....
|
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Wed 14 Feb '07 9:37 Post subject: |
|
|
are you using the latest php release? if os did you get the thread safe one? |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Sat 24 Feb '07 0:58 Post subject: |
|
|
I'm not sure what the difference is between the thread safe one and the regular one... I took the one in on snaps.php.net... |
|
Back to top |
|
PaRK_7677
Joined: 01 Jun 2006 Posts: 65 Location: Missouri
|
Posted: Sat 24 Feb '07 1:42 Post subject: |
|
|
In the config file you post you have CGI and the module both configured.
For CGI:
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"
For FastCGI: (something like this)
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler php-fastcgi .php
SetHandler fastcgi-script
Action php-fastcgi "/php/php-cgi.exe"
For Module: (below shown for Apache 2 (not 2.2)
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
Do one. In your http.conf you have FastCGI and the Module loading. Check out PHP.net's documentation on how to install on Windows using Apache: http://www.php.net/manual/en/install.windows.apache2.php |
|
Back to top |
|
Thog
Joined: 12 Feb 2007 Posts: 75 Location: Montreal
|
Posted: Sat 24 Feb '07 2:41 Post subject: |
|
|
I have it loaded... That is not the problem The problem happens when I run PHP as a module... Threads keep disappearing until none listen anymore... Using FCGI works but unfortunately the old versions didn't allow for multiple php.ini files... I think this new version will that just came out... I'm trying it out now... |
|
Back to top |
|
Snecx
Joined: 14 Dec 2006 Posts: 6
|
Posted: Thu 01 Mar '07 18:12 Post subject: |
|
|
@Thog:
You have BOTH the php module AND fcgid loaded based on the latest configuration you've posted.
Quote: | LoadModule fcgid_module modules/mod_fcgid.so
ScriptAlias /php/ "D:/Apache Group/PHP/"
AddType application/x-httpd-php-cgi .phpcgi
Action application/x-httpd-php-cgi "/php/php-cgi.exe"
SetEnv PHPRC "D:/Apache Group/PHP/php.ini"
DefaultInitEnv PHPRC "D:/Apache Group/PHP/php.ini"
DefaultInitEnv PATH "D:/Apache Group/PHP;C:/WINDOWS/system32;C:/WINDOWS;"
DefaultInitEnv SystemRoot "C:/Windows"
DefaultInitEnv SystemDrive "C:"
DefaultInitEnv TEMP "C:/WINDOWS/TEMP"
DefaultInitEnv TMP "C:/WINDOWS/TEMP"
DefaultInitEnv windir "C:/WINDOWS"
LoadModule php5_module "D:/Apache Group/PHP/php5apache2.dll" <-- you should remove this line, this is for module. You have module + FCGI running, not good.
AddHandler fcgid-script .php
PHPIniDir "D:/Apache Group/PHP/php.ini"
|
When you are running just the module, perhaps you should start with a new configuration file? Your current file has too many things on php alone, which I believe is unnecessary.
Also, you cannot run php-cgi as module. It is not supposed to work. |
|
Back to top |
|