You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <jo...@slive.ca> on 2002/02/05 15:59:41 UTC

RE: send body timed out

> From: BAO RuiXian [mailto:bao.ruixian@atbusiness.com]

>
> Hello, Joshua,
>
> >
> > "long_process" means the stuff that you want to keep going
> after the main
> > page has been delivered to the client.  This is the stuff that
> is doing your
> > long calcualtions.  If you don't put it in background and close the file
> > descriptors, it will get killed when the client finishes
> getting the rest of
> > the page.
>
> Actually, my program has many 'long processes'. There is a loop
> in the program,
> and each loop will try to execute one SQL sentence. Before
> finishing execution
> of each sentence, I don't want to process futher, for I want to
> get the result
> to the page (now of course to a separate file.). Obviously, the
> strategy in the
> following is not quite suiting my needs. I have read quite some
> disccution from
> some related newsgroups (that is also why I response to your
> message a little
> bit later), and have got some ideas.


>
> Actually, before your this message, I tried the following command
>
>     $sth->execute()< /dev/null > /dev/null 2>&1 &
>
> And not working, giving syntax error, then I tried to use double
> quotes to quote
> them, and eval to include them, but nothing happended in the database.
>
> Thank you very much for your great help and will let you know if
> I have further
> problem.
>

My example was sh (bourne shell) syntax.  It needs to be adapted for
whatever language you use, but the basic idea (put it in the background and
close stdin, stdout, and stderr) should be relatively easy to implement in
any language.

You seem to be trying to fork a bunch of different background jobs.  This is
not necessary.  You simply need to fork one long-lived process, close its
file descriptors, and have it do all the processing you want.

I would suggest, if you need further detailed help, that you go to a forum
specific to the language you are using (perl?) or to one of the cgi forums.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: send body timed out

Posted by BAO RuiXian <ba...@atbusiness.com>.
Hello, Joshua,

Strange that I also got my previous mail from the list just couple of days ago.
Anyway.

>
> My example was sh (bourne shell) syntax.  It needs to be adapted for
> whatever language you use, but the basic idea (put it in the background and
>

Thanks. How come I forgot the syntax is not for Perl.

> close stdin, stdout, and stderr) should be relatively easy to implement in
> any language.
>

To be honest, I did not close the stdin, stdout and stderr descriptors, although
I should. I did not do it because my child block only contains one line, i.e.
$sth->execute().

>
> You seem to be trying to fork a bunch of different background jobs.  This is
> not necessary.  You simply need to fork one long-lived process, close its
> file descriptors, and have it do all the processing you want.
>

Yes, indeed. The long processes are inside a module, somehow far-away from the
main program where the loop block locates. If include the loop inside the child,
the child block will be long and printing of the status for each statement
execution will also need to be done inside the child. I am afraid of the longer
the child is, the more problem it might cause.

>
> I would suggest, if you need further detailed help, that you go to a forum
> specific to the language you are using (perl?) or to one of the cgi forums.
>

That is true, thanks. Actually, I have already looked some newsgroups, although
it is often like that a right solution needs good experiences from various
aspects of web application, such as CGI, database, programming languages etc.

Best

Bao

--
BAO RuiXian,  PROGRAMMER, Technologies Team, Project Services Group
AtBusiness Communications Corp., Kaapeliaukio 1, FIN-00180 Helsinki
tel. +358-9-2311 6674, mob. +358-50-329 6275,  fax +358-9-2311 6601
http://www.atbusiness.com, email: bao.ruixian@atbusiness.com



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Load Balanced, clustered, no error logs.

Posted by Joshua Slive <jo...@slive.ca>.
> From: justken [mailto:justken@rogers.com]
>
> If someone could let me know specifically if logging errors to a
> directory
> using the vhost container on a load balanced and is in some way limited,
> buggy, or disabled. and or a work around, i would be greatly indebted.

There is nothing in apached which prevents having a separate error log for
each virtual host.  A few things to consider:

1. It sounds like a rather complicated setup.  I have no idea exactly what
your ISP is doing, so it is impossible to tell if there is some non-apache
related restrction.

2. Log files should not be placed in non-root writable directories because
of serious security issues.

3. Sites with a very large number of vhosts sometimes need to log to a
single file because they do not have enough file descriptors available to
log separately.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Load Balanced, clustered, no error logs.

Posted by justken <ju...@rogers.com>.
our host is using load balancing on a clustered server system, they are 
using BSD and NT with some sort of OS cross bridge.

we have learned from the senior technical advisor that the errors can only 
be directed to a single error_log. I have sent him my httpd.conf  file 
where my error logs are routed to a log directory in each vhost container, 
but am not sure this will work on a system of that nature, as i am not 
nearly in a position to understand what is happening over a clustered 
setup, but would assume that each server instance would have the same 
httpd.conf file, and that external routers would be responsible for 
splitting the load across each server. the log files are then mirrored 
across the rest of the system as time progresses - am i correct in thinking 
this?

If someone could let me know specifically if logging errors to a directory 
using the vhost container on a load balanced and is in some way limited, 
buggy, or disabled. and or a work around, i would be greatly indebted.

If this is contained in the manuals, please direct me there, as i have not 
gotten much past single server hosting for my own purposes. and don't 
really know where to start looking, and this is fairly important to me. I 
have searched for information on clustering and apache, however it seems 
that nothing is explained about the ramifications of clustering, except 
sharing issues.

thanks



ken easson
justken.net
justken@rogers.com
justken web programming and technical support.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org