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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > requests time out (sometimes...)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2006, 12:34 PM
sofatime sofatime is offline
Senior Member
 
Join Date: Jul 2006
Location: Switzerland
Posts: 65
Default requests time out (sometimes...)

I have almost finished the installation of lsws and I am really happy with it. There is just one strange problem left: Sometimes requests do not get answered and time out. This only happens very rarely. It is difficult to say how often as this is still only a test box, but I would say less than 1%. It seems to be happening only with php requests, but I cannot say that for sure.
If I stop the request and reload it gets answered immediately.
It also seems to me that it happens more often when I do a graceful reload after a configuration change. If I stop and start using lswsctrl it does not happen often.

about the installation:
Solaris 10 x86
lsws enterprise 2.1.18 trial with chroot
using the php binary that came with lsws
php.ini is mostly the default one
using a lsphp process per virtual host with "cgi set uid mode" set to "docroot ID"

Any idea?

Thank you
Daniel
Reply With Quote
  #2  
Old 07-25-2006, 02:04 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Is the timeout consistent after it starts to happen? Or randomly? A few tips to identify the problem, set "max connection" to "1", enable debug logging, "ktrace" lsphp and lshttpd when that happened and compare the trace result when it is normal.
Reply With Quote
  #3  
Old 07-25-2006, 10:42 PM
sofatime sofatime is offline
Senior Member
 
Join Date: Jul 2006
Location: Switzerland
Posts: 65
No, the timeout is not consistent. It seems to be randomly. I will try with debug logging.
Just came across another problem: Apparently DNS lookups do not work in php, e.g. in DB configuration I have to use the IP of the MySQL server. First I had lsws installed without chroot, where this did not happen, now I have it installed with chroot. So I suspect it has to do with that. In the chroot env I have /etc/resolv.conf (was copied during install) with correct values.

BTW: The login to the LiteSpeed Admin GUI Demo is not valid anymore (this is always a good tool to check for default values in configuration...).
Reply With Quote
  #4  
Old 07-26-2006, 07:18 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Maybe some dll needed for DNS lookups are missing in the chroot jail, you can use ktrace to find out by comparing the system calls from a normal PHP and a jailed PHP from command line.
Reply With Quote
  #5  
Old 07-26-2006, 01:27 PM
sofatime sofatime is offline
Senior Member
 
Join Date: Jul 2006
Location: Switzerland
Posts: 65
The following files were missing:

chroot/usr/lib/nss_dns.so.1
chroot/usr/lib/nss_files.so.1
chroot/etc/netconfig

I also copied over chroot/etc/nsswitch.conf, although that is not needed. I am also not sure if nss_files.so.1 is really needed, maybe nss_dns.so.1 is enough, did not test that (I assume nss_files.so would be to access the hosts file).

Maybe you can include that in the chroot-create-script for solaris.
Reply With Quote
  #6  
Old 07-26-2006, 01:49 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Thanks, I will add them.
Actually, the script tries to copy nss_dns.so.* and nss_files.so.* from /lib/ directory, they are in /usr/lib/ on your server. :-)

Last edited by mistwang; 07-26-2006 at 01:52 PM..
Reply With Quote
  #7  
Old 07-26-2006, 11:12 PM
sofatime sofatime is offline
Senior Member
 
Join Date: Jul 2006
Location: Switzerland
Posts: 65
No, they are in /lib. In /usr/lib I have symlinks to the ones in /lib. I will move them to chroot/lib then.
I see in the script that it copies the nss_* files too, but not for SunOS. There is an "if" structure and the nss_* files only get copied for "else" and not for "SunOS".
Reply With Quote
  #8  
Old 07-31-2006, 11:32 AM
sofatime sofatime is offline
Senior Member
 
Join Date: Jul 2006
Location: Switzerland
Posts: 65
about the timeout problem: I solved that compiling my own lsphp (5.1.4) with apc according to the instructions in the wiki. With this new lsphp no timeout problems occur anymore (tested a lot with ab).
I couldn't compile in gd yet, but that's another problem...

I had to copy several libs in the chroot for the new lsphp to work (libxml.so.2, libiconv.so.2 and others). Why were they not necessary with the stock lsphp? Can (should) I compile these libs statically in lsphp? How? I don't mind having these libs in chroot, just wondering. And I also wonder why my lsphp is 12MB while the stock lsphp is only 2 MB. (?)
Reply With Quote
  #9  
Old 07-31-2006, 11:47 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
The stock lsphp is 4.4.2, do not use libxml etc. You don't need to statically link to those libs, as you don't need to distribute the binary on different OS environment.
do "strip lsphp" will shirk the size of the executable by removing debug symbols, but you better leave them along, just in case you need to debug a PHP problem. It should not increase the memory usage at run-time.
Reply With Quote
  #10  
Old 08-03-2006, 10:16 AM
sofatime sofatime is offline
Senior Member
 
Join Date: Jul 2006
Location: Switzerland
Posts: 65
I am pretty happy with my setup now (even managed to compile in gd), there's only two small problems:

1) the mentioned timeout problems occur in the admin interface sometimes. that is not really a problem because after just clicking again it works.

2) graceful restart does not work. after graceful restarting it seems like it is not being properly restarted, even the admin interface does not respond anymore sometimes. I always use lswsctrl stop/start, then everything works. But with lswsctrl it takes a long time (or several lswsctrl stop) until all processes are stopped.

Any idea?
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
About First Time Loading paTRon Install/Configuration 3 07-20-2007 04:00 AM
404-Handler does not work with POST requests andreas Ruby/Rails 2 08-03-2006 07:39 AM
Speed problem downloading large file user3 Install/Configuration 23 07-06-2006 12:04 PM
Why LSWS slower than Apache 1.3 on my server ? dredy Apache Migration/Compatibility 1 02-22-2006 06:44 PM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM


All times are GMT -7. The time now is 11:43 PM.



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