LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > problem with php4 as fcgi both remote/local

Reply
 
Thread Tools Display Modes
  #1  
Old 10-01-2006, 07:14 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
Default problem with php4 as fcgi both remote/local

Hey folks,

I know I'm having a kinda strange configuration but here's the deal:
I'm running two web-servers currently with lsws.
Usually only one is serving requests and just uses the other one as php-fcgi load-balanced backend (together with local php-fcgi backends).
This part works fine.
I've got php5 + php4 installed on both machines and working.

Now, once the main-machine fails, the second machine should take over its ip-address and serve the requests.
The takeover of the ip-address is working fine with heartbeat.

But the problem is on the second backup-machine with accessing the local php4 instance through tcp/ip.
It simply can't reach it and returns a 503 error.
The other (main-) machine uses the php4 instance on the backup-machine without any problems through the internal load-balanced fcgi-backend.

So, what could be the problem?
I've been looking for a solution for hours already and can't find it.

The configuration is as follows:
Code:
	FastCGI App Definition	   Edit   Delete   Back
Name	fcgi-local
Address	192.168.115.11:1026
Max Connections	20
Environment	PHP_FCGI_CHILDREN=20
PHP_FCGI_MAX_REQUESTS=1000
FCGI_WEB_SERVER_ADDRS="192.168.115.11,192.168.115.10,127.0.0.1"
Initial Request Timeout (secs)	60
Retry Timeout (secs)	0
Persistent Connection	Yes
Connection Keepalive Timeout	-1
Response Bufferring	No
Auto Start	Yes
Command	/usr/lib/php4/bin/php-cgi -b 192.168.115.11:1026
Back Log	100
Instances	1
Run On Start Up	Yes
Max Idle Time	-1
Priority	0
Memory Soft Limit (bytes)	300M
Memory Hard Limit (bytes)	350M
Process Soft Limit	110
Process Hard Limit	110
Yes, I know I could remove the -b ip part but that only worked for me for php5. with php4 the other machine couldn't connect if I left out the -b ... .


Thanks,

thomas
Reply With Quote
  #2  
Old 10-01-2006, 04:03 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Maybe the FCGI instances on the backup machine is still pre-occupied by the first machine, TCP connections is still established between FCGI processes and the LSWS on first machine.
To solve this issue, you need to set "PHP_FCGI_CHILDREN=40", so there is always php process available for local use.
Reply With Quote
  #3  
Old 10-01-2006, 05:26 PM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
hmm, I'll try that but its really not fully used.
the first machine mostly has a pool of around 5 or 6 of the connections from the second machine.
but its worth a try.
Reply With Quote
  #4  
Old 10-02-2006, 01:58 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
Ok, rised both connections and PHP_FCGI_CHILDREN to 40.
Nothing changed.
tried it without raising connections, same result.

Any further ideas or how to track this down?
enabled debug log only showed "connection reset by peer" for the fcgi connection. no, I don't have a firewall or something enabled.
Reply With Quote
  #5  
Old 10-02-2006, 09:39 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Maybe it is the fault of FCGI_WEB_SERVER_ADDRS, please try with it being removed.
Reply With Quote
  #6  
Old 10-02-2006, 02:13 PM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
yeah removing it works. too bad its then open to all ip-addresses. I can only bind it to my private ip-address which can still be reached in the same network.
strange that the same line works with php5-fcgi apps without problems.
Reply With Quote
  #7  
Old 10-02-2006, 04:46 PM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
The past few php 5.1.X release are using a completedly rewritten FCGI package versus older php5 and php4 releases. They might have improved it when it comes to bugs/features as compared to the php4 fcgi.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:47 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.