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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > 2.0.6 & PHP

Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2005, 09:48 AM
jailbird jailbird is offline
Member
 
Join Date: Oct 2004
Posts: 23
Default 2.0.6 & PHP

Hopefully you can help me with this problem. Our production server (E4500 running Solaris 8) for some intranet apps have been running an old pre-2.x lsws setup. The last few days it has been giving 503 pages constantly, and nothing short of a restart would fix it. I finally upgraded it to 2.0.6 to try and help. Now it's not 503'ing, but just about 24 hours (not exactly, but close) and PHP-based page just hangs for about 60+ seconds and then errors out. Any non-PHP page works fine. Once this starts happening a "pkill php" seems to fix the problem. I've tried disabling APC, and I've tried switching between my new copy of PHP 4.3.11 and my old 4.3.9. I'm not sure if the problem is PHP itself or lscgid. I can't truss them, however, since they're suid root.

Do you guys have any clue what's going on? My coworker is complaining at me to put Apache back on, but I really don't want to. Is it really a PHP problem?

Thanks again,
-Dustin
Reply With Quote
  #2  
Old 05-29-2005, 10:17 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
do you run php through lscgid? why not through fastcgi?
Reply With Quote
  #3  
Old 05-29-2005, 05:03 PM
jailbird jailbird is offline
Member
 
Join Date: Oct 2004
Posts: 23
Quote:
Originally Posted by ts77
do you run php through lscgid? why not through fastcgi?
Yes I'm running it as FastCGI (the default PHP config). I assumed lscgid was used for FastCGI as well?

-Dustin
Reply With Quote
  #4  
Old 05-31-2005, 09:47 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Dustin,

lscgid is not used for FastCGI, unless FastCGI is started in suEXEC mode.

I think what experiencing is that all available PHP processes block on MySQL connections or other socket connections, so all of them won't accept any new requests and requests will be timed out.

On Linux I use "strace" along with 'lsof" to check those PHP processes, not sure how to do it on Solaris. Output of "strace" always shows that PHP process was sitting at "read( x, ... )" syscall. usually 'x" is the file descriptor of the MySQL client connection. So, you may want to check what those PHP processes were doing when that happens.

We are trying to find a proper way to detect those problems and restart PHP automatically. There are some PHP and MySQL configurations to soften the problem. On PHP side, turn off MySQL persistent connection, On MySQL side, set the following in the my.cnf

Code:
interactive_timeout=30
wait_timeout=30
Please let me know it helps or not. :-)

George
Reply With Quote
  #5  
Old 05-31-2005, 10:05 AM
jailbird jailbird is offline
Member
 
Join Date: Oct 2004
Posts: 23
Quote:
Originally Posted by mistwang
Dustin,

lscgid is not used for FastCGI, unless FastCGI is started in suEXEC mode.

I think what experiencing is that all available PHP processes block on MySQL connections or other socket connections, so all of them won't accept any new requests and requests will be timed out.

On Linux I use "strace" along with 'lsof" to check those PHP processes, not sure how to do it on Solaris. Output of "strace" always shows that PHP process was sitting at "read( x, ... )" syscall. usually 'x" is the file descriptor of the MySQL client connection. So, you may want to check what those PHP processes were doing when that happens.

We are trying to find a proper way to detect those problems and restart PHP automatically. There are some PHP and MySQL configurations to soften the problem. On PHP side, turn off MySQL persistent connection, On MySQL side, set the following in the my.cnf

Code:
interactive_timeout=30
wait_timeout=30
Please let me know it helps or not. :-)

George
I feel stupid then, I guess I figured that since php was in fcgi-bin that lscgid was used .

I was indeed starting to think it was a PHP problem, since as a stop-gap I put in a cron to restart PHP every 5 minutes, and since then our monitoring app hasn't paged me (finally!). I was just worried that maybe it was lsws's connection to PHP that was hanging.

I actually thought that I got rid of the mysql_pconnect()'s a long time ago, but I guess I only did that in dev and not prod.. DOHT!

I made all of the changes. Hopefully it works better. I'll let you know.

Thanks again. I have to say you guys rock. Even though I'm not a paying customer, you've still helped with every problem I've had. You can be assured that if I can ever justify paying for a web server, you guys will be the first choice!

-Dustin
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
replacing system php felosi PHP 3 07-16-2007 11:23 PM
Usability issue with LSAPI PHP jrmarino PHP 5 05-08-2007 01:54 PM
setup php in rails template cswilliams Install/Configuration 2 01-25-2007 08:21 AM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM
Custom PHP integration RikitZap Install/Configuration 2 04-25-2005 06:52 PM


All times are GMT -7. The time now is 06:37 AM.



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