• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

Frustrations with Apache

Started by Fahrvenugen, 2009.06.28, 21:33:04

Previous topic - Next topic

Fahrvenugen

Hi,

I'm posting this here because I'm hoping that maybe someone has run into this situation before.

One of the sites that I manage has 2 systems running OS/2, (actually, one is running a Warp 4 w/FP15, the other running eCS 1.2MR).  One of the tasks that each server is running includes a copy of MySQL, PHP, and a web server.  Up to now, the server that I was using was Dink's Web/2 with PHP as a CGI, this configuration has run flawlessly for approximately 2 years at that site.

We're in the process of switching one of our web sites that we host over to Wordpress, and have a need to use the aliased URL's that Apache can take advantage of (but Web/2 can't), so in order for this I switched over to Apache 2.2.11.

Since switching, I've run into endless difficulties with the setup.  It seems that what is happening is Apache over a brief period of time (less then 6 hours) and use open up a bunch of sockets, leave them open, and then freeze up.  Once frozen it'll still serve up static TXT and HTML files, but any type of PHP will just hang and never load up the web page.

If I try and kill Apache (with CTRL-C, or a process killer, including the death9 killer that can be activated through loading the xfree86 driver in config.sys) it'll hang Apache upon exit, it won't die.  Once Apache is hung, if I try and restart a new Apache it won't serve anything.  I know it has released the port as I can start up Dink's Web/2 and it'll run happily.  But to make things worse, once Apache hangs I can't soft-reboot the computer with a CTRL-ALT-DEL or a setboot /b (or any of the other ways to reboot the computer).  If this is tried it'll pop up the "rebooting" window then hang the whole system.  The only way to reboot is with the reset button / killing the power.

For testing purposes I tried both machines I have there, plus I tried setting up a spare (3rd) machine where its only purpose is Apache, MySQL, and PHP, running nothing else, fresh install.  And I have experienced the same result.

For Apache, I've tried Versions 2.2.11, 2.2.10, 2.2.9, 2.2.8, and 2.2.4.  For PHP I've tried Versions 5.2.10, 5.2.9, 5.2.8, 5.2.4. It doesn't seem to make much difference as to the version.  I've also tried setting up PHP within Apache using the PHP Apache module, plus I tried running PHP as a CGI (thinking that since Web/2 runs PHP as a CGI and Web/2 has never had any issues with PHP stuff, it might be something with the Apache DLL PHP module).  I ran into the same difficulty with both setups within Apache.

For TCP/IP, when I run inetver it comes up with everything at the 6.3100 version level.

Has anyone else run into this type of issue?  Could it be something in the TCP/IP stack causing the difficulty? 

Thanks,


Fahrvenugen

Hi again,

I just had a thought that there might be something within afinetk.sys and socketsk.sys causing the problem, so I've switched over to afinet.sys and sockets.sys instead (it occured to me that I've had issues with the K versions of these 2 files in the past at other locations where I have Warp running).  If it fixes the issue I'll post an update to let everyone know.

Again, if anyone else has other ideas I'd love to hear them.

Thanks

RobertM

Hi Fahr,

I've run one of the more recent Apache builds (from Paul's site), PHP and MySQL - along with Joomla and Typo/3 - on a single CPU machine running eCS 1.2MR without running into those issues. Sadly, that machine is not running at the moment, so I do not know exactly how it was configured. Thus, all I can contribute is that I did not run into the issues you ran into. I did no updates to eCS from what was installed from the disk.

I am interested in if changing the socket and afinet drivers resolve the issue though, so let us know.

Soon I will be duplicating the install I had on an IBM x440 SMP machine with either WSeB or eCS installed on it (probably WSeB to take advantage of some of the features that the x440 has).

Rob


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


IBManners

Hi,

In one of your files associated with apache conf, ensure that your Keepalive directive is low,
same with a couple of other parameters.

ie

KeepAlive On
KeepAlive 5
KeepAliveTimeout 15
MaxClients 30
MaxRequestsPerChild 20

Also if you use \mptn\etc\inetcfg.ini, or do it manually, ensure that  keepalive is set for 30 (60 max).

There are a few other gotchas but it really depends on your setup.

I use afinetk.sys and socketsk.sys and apache_1.3.41-os2.zip with PHP and Mysql and have had no
problems, server runs upto about 6 months, then I swap between primary and backup servers which
is the only reason I normally take it down.

I still haven't taken the time to upgrade to Paul's Apache v2 series.

Cheers
I am the computer, it is me.

Fahrvenugen

Hi,

Thanks for the suggestions, I'll add them to the Apache config file and let you know.

As for switching to the non-K versions of the stack files, that doesn't seem to make any difference. 

But I think I've narrowed it down to soemthing PHP related.  It has just stopped responding again on me, all the text and static html files are served just fine.  But if I try and hit any PHP files on the server, it is non-responsive.

It doesn't appear to be MySQL, as that still responds to the CLI access via Mysql

And php itself works from a command prompt / CGI when I fire it from a command line on a test file.

There's something about running it with Apache that is causing issues for me. 






Fahrvenugen

 Well, I tried the various keepalive and maxrequests settings, and they made no difference, I still ran into the same issue.  But another thought just occured to me.  I've got all my servers set with:

PRIORITY=ABSOLUTE

in the config.sys.  If there's a priority inversion going on within Apache, it could cause an endless hang in OS/2's scheduler.

To test my theory, with priority=absolute on, I tried starting up Apache at a different priority level using Priority Master II, and it almost immediately ran into trouble.  This could be part of what's going on.

Is anyone else running Apache with PRIORITY=ABSOLUTE ?

For now I'm changing the setting in config.sys to PRIORITY=DYNAMIC on my test machine to see if that fixes anything.  I'll keep everyone updated.

Fahrvenugen

Well, it looks like a priority inversion might be a cause of the problem.

That computer has run now for over 24 hours after rebooting with the setting PRIORITY=DYNAMIC in the config.sys (instead of setting it to ABSOLUTE) and Apache is still running and responding.  Furthermore sockets and ports are being closed as they should.

Sure enough, its memory usage grew from about 20 Megs to 80 Megs overnight, but this could be any number of things.

Furthermore, to suggest this might be the problem, I tried to kill Apache with CRTL-C, and it quit properly as it should.  The memory it used was released, and I ended up back at a command prompt.  Previously it would hang on a CRTL-C exit, so this is a good sign.

It'll take me a few more days of constant usage to convince me that the priority setting was causing the problem (and the solution), but at this point it looks like it is a good candidate.

Now I just need to try the latest build(s) of Apache and PHP (the current test machine is running the older Apache 2.2.8 with PHP 5.2.4)


IBManners

Hi Fahrvenugen,

You might have your solution, I've always run with PRIORITY=DYNAMIC and PRIORITY_DISK_IO=YES on both servers and clients, that way (at least in theory) a process cant be locked out from CPU.

Cheers
I am the computer, it is me.

RobertM

Thanks Fahr! Not a setting I usually play with, but one I have considered playing with... so, now I know better and will simply let OS/2 do it's thing.

-R


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Fahrvenugen

#9
Well, on servers where I've set priority=absolute and then individually set the priorities of the applications that are running using one of the various priority setting utilities out there based on which apps should have a quicker response time, I've found I usually can get a 25% - 40% performance boost when I benchmark compared to having priority=dynamic and let the system try and figure everything out.   And normally OS/2 applications have no difficulty running in either mode, but it appears that Apache probably has something going on with how it is doing its own prioritization of stuff that doesn't co-exist nicely with OS/2's priority=absolute feature.  Not that its a huge deal, its just good to know to make sure priority=dynamic on any systems running Apache.

Of course for workstations having the setting to dynamic normally gives better response, as it will boost whichever app has the focus of the keyboard / mouse.  I normally only change this setting on servers.


Fahrvenugen

Well, I think I can put this issue to rest.  It has now been a week since I switched 2 of the 3 servers that I was having the problem on over to PRIORITY=DYNAMIC in config.sys, and I have not yet had Apache lock up / freeze up on me and I can kill Apache with CTRL-C every time I've tried.   One server I ran on Apache 2.2.8 , the other 2.2.11, and both are working as expected now. 

Anyways, I'm just glad to have figured out the difficulty, and glad to be able to keep those systems running on OS/2 / eCS (my alternative was to switch at least one of those servers over to either Linux or Windows)

Thanks to everyone who helped with suggestions!