You are here: Re: Is it possible to avoid loading the script for each request « PHP Programming Language « IT news, forums, messages
Re: Is it possible to avoid loading the script for each request

Posted by NC on 06/02/07 17:52

On Jun 1, 11:01 am, DavidNorep <avdavid.nore...@gmail.com> wrote:
>
> I have also another question which is probably general for every
> CGI, no matter in which technology it is implemented.

Nope; it's highly specific to the OS and HTTP server.

> Suppose that a CGI is running and another request arrives, i.e.,
> it is invoked by another visitor to the website; will another
> instance of the CGI start running or will the second request wait
> until the running CGI finishes its work

If the second request arrives and the HTTP server has enough
resources remaining to serve a response, it will. If the second
request arrives and the HTTP server does not have enough resources
remaining to serve a response, the second client will wait as
long as it is configured to do, then time out.

> is there a way to control this behaviour.

Yes, but you have to code for it. Every instance of the script
must start by checking if it is the only one running (there are
many ways to get this done). If it is, it should keep running;
if it isn't, it should issue a "Location:" header to redirect
the client to itself.

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация