|
|

07-25-2006, 12:34 PM
|
|
Senior Member
|
|
Join Date: Jul 2006
Location: Switzerland
Posts: 65
|
|
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
|

07-25-2006, 02:04 PM
|
|
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.
|

07-25-2006, 10:42 PM
|
|
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...).
|

07-26-2006, 07:18 AM
|
|
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.
|

07-26-2006, 01:27 PM
|
|
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.
|

07-26-2006, 01:49 PM
|
|
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..
|

07-26-2006, 11:12 PM
|
|
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".
|

07-31-2006, 11:32 AM
|
|
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. (?)
|

07-31-2006, 11:47 AM
|
|
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.
|

08-03-2006, 10:16 AM
|
|
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?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 11:43 PM.
|
|