Operating System - HP-UX
1833531 Members
3073 Online
110061 Solutions
New Discussion

Re: Apache inconsistent start

 
Ian Dennison_1
Honored Contributor

Apache inconsistent start

I have inherited an Apache install which sometimes starts and sometimes doesn't.

The behaviour it exhibits is that it will only start 1 httpd process, which will not respond to a web query. It also puts an incorrect pid in the apache/logs/httpd.pid file, and so cannot close down cleanly.
It also states that it cannot create the scoreboard with a shared memory failure.

The real curse of this problem is that it worked fine this morning, i made some changes & it didn't work, so I reverted the changes and the problem remains.

Is there something else lurking around in the system? Port Numbers tied up, temporary files to be cleaned (I have cleared apache/logs/* every time). www.php.net was singularly unhelpful.

Has anyone seen this before and know how to fix it?

Cheers, Ian Dennison
Building a dumber user
8 REPLIES 8
Bill McNAMARA_1
Honored Contributor

Re: Apache inconsistent start

what version of apache?
where did you d/load it from?
(does it show on swlist)

anything in the error_log, are there PID logs?

Later,
Bill
It works for me (tm)
Ian Dennison_1
Honored Contributor

Re: Apache inconsistent start

Bill,

Directory of logs,...
-rw------- 1 root sys 0 Sep 19 11:38 apache_runtime_status
srwxrwxrwx 1 phpdev sys 0 Sep 19 11:38 cgisock
-rw------- 1 root sys 357 Sep 19 11:38 error_log
-rw------- 1 root sys 5 Sep 19 11:38 httpd.pid
-rw------- 1 root sys 0 Sep 19 11:34 phpdev.dcsit.net-error_log
drwx------ 2 root sys 1024 Sep 19 10:20 prev
drwx------ 2 root sys 96 Sep 19 10:22 prev2

Contents of error log

[Thu Sep 19 11:34:59 2002] [crit] (17)File exists: unable to create scoreboard (name-based shared memory failure)
[Thu Sep 19 11:38:20 2002] [warn] pid file /phpdev/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Thu Sep 19 11:38:20 2002] [crit] (17)File exists: unable to create scoreboard (name-based shared memory failure)

I did a netstat and found the following process open,...
6516840 stream 0 0 8062180 0 0 0 /phpdev/apache/logs/cgisock

Should I be killing this off to make a clean shutdown?

Share and Enjoy! Ian
Building a dumber user
George A Bodnar
Trusted Contributor

Re: Apache inconsistent start

You should be using apachectl stop and apachectl start to stop and start.

Without the scoreboard the software will not work - are you out of shared memory or very low? You could try having it use an external file with the following stanza in the config file:

ScoreBoardFile logs/apache_runtime_status
Ian Dennison_1
Honored Contributor

Re: Apache inconsistent start

have changed the umask within the apachectl script to allow rw for all users on the scoreboard file. Same result.

Noticed that the following output from sar shows,...

dcsux108> sar -v 2 20

HP-UX dcsux108 B.11.11 U 9000/869 09/19/02

13:29:59 text-sz ov proc-sz ov inod-sz ov file-sz ov
13:30:01 N/A N/A 150/664 0 7360/7360 0 697/12018 0
13:30:03 N/A N/A 150/664 0 7360/7360 0 697/12018 0
13:30:05 N/A N/A 150/664 0 7360/7360 0 697/12018 0
13:30:07 N/A N/A 150/664 0 7360/7360 0 696/12018 0

swapinfo and top both show memory free. I am guessing more inodes are needed. Which kernel parameter should I adjust?

Cheers, Ian Dennison
Building a dumber user
Ian Dennison_1
Honored Contributor

Re: Apache inconsistent start

george,

Yes I have the line in the httpd.conf file for scoreboard. I remove the external scoreboard file every time I shutdown the apache server. I also use the apachectl script, with environment variables set inside for Oracle Integration.

Cheers, Ian Dennison
Building a dumber user
George A Bodnar
Trusted Contributor

Re: Apache inconsistent start

If you are using an external scoreboard file you shouldn't be getting those shared memory errors because the software is not supposed to need to create one.

Are you starting/stopping this software as root?
Ian Dennison_1
Honored Contributor

Re: Apache inconsistent start

I am starting the system as root, with the target user and group of 'phpdev' set in the httpd.conf file.

I have bumped up the shmmax and ninode parameters and rebooted the box. The httpd daemons started OK, but it remains to be seen if the Oracle integration works.

Thanks for your assistance.

Share and Enjoy! Ian
Building a dumber user
George A Bodnar
Trusted Contributor

Re: Apache inconsistent start

Good to hear that worked. The ninode parameter only applies if you are using hfs file systems - most likely the shmmax parameter was the fix.