Operating System - HP-UX
1752802 Members
5297 Online
108789 Solutions
New Discussion юеВ

Apache CGI Process Sleeping

 
Dave McIsaac
New Member

Apache CGI Process Sleeping

WE are running an Apache web server (version 2.0.59) on an HP A500 computer using HP-UX B11.11 U 9000/800 OS. When the server invokes a cgi process (script) that prints to stdout the process is put to sleep until the server timesout. At this point the server sends the correct response to the client. An HP 9000 workstation running B 11.11 and Apache 2.0.48 works fine. What can I do to fix this or work around it?
6 REPLIES 6
Sandman!
Honored Contributor

Re: Apache CGI Process Sleeping

Can't think of much apart from patching the A-class server. So you might want to try the operation after bringing the A500 server upto the latest patch level.
Dave McIsaac
New Member

Re: Apache CGI Process Sleeping

The server was wiped and reloaded from the latest OS level sent to us by HP (~mid 2006 release). The Apache server was included and we first found this problem with it. I recently installed the latest Apache server binary release from HP and got the same results.
Dave McIsaac
New Member

Re: Apache CGI Process Sleeping

The server was wiped and reloaded from the latest OS level sent to us by HP (~mid 2006 release). The Apache server was included and we first found this problem with it. I recently installed the latest Apache server binary release from HP and got the same results.
Steven E. Protter
Exalted Contributor

Re: Apache CGI Process Sleeping

Shalom,

I've created the same problem myself with bad cgi code.

I did it with a sleep/wait statement in my script. I'm betting the delay in this case is when the print job is being submitted.

It may be something you can clear up with a newer apache release or OS patch to the print subsystem.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dave McIsaac
New Member

Re: Apache CGI Process Sleeping

The cgi script is Tcl and has no sleep (after in Tcl) statements. It executes a "puts stdout ..." statement in a loop. The really strange thing is that when I attach truss to the parent server process to watch what is going on everything works great. Also, if I wait and let the process complete then it works properly from there on but only as that user. If I log into the server as a different user then I have to go through the whole waiting thing again. I have checked file permissions, server configuration, kernel parameters, etc..
Everything looks to be correct. Another strange thing is if I switch from using mod-cgi to mod-cgid then it seems to work OK. I haven't done extensive testing in this mode because mod-cgid won't let you upload files and we need this capability.
Dave McIsaac
New Member

Re: Apache CGI Process Sleeping

I re-read the Admin Guide for HP-UX Apache Based Web Server. to use mod_cgid you need to specify a port number in the Apache ScriptSock directive. Doing this seems to have fixed the problem I was having and I can also upload files.