[Tech] Timeout su CGI perl

Franco Bagnoli franco.bagnoli@unifi.it
Mer 19 Giu 2002 16:38:51 CEST


On Wed, 19 Jun 2002, Claudio Cicali wrote:

> 
> Ho un CGI perl che provvede all'upload di un file e al successivo
> inserimento delle righe di questo all'interno di un database (una
> import massiva, insomma). L'upload avviene con successo, mentre il
> resto dell'operazione si ferma dopo "un po'"... i record sono circa
> 180'000 e questo si ferma dopo 15'000 o 20'000.. 
> 
> Se uso il CGI da command line, tutto a posto. I record sono inseriti
> tutti. 
> 
> Il problema dunque e` in qualche tipo di resource control da parte
> di mod_perl.
> 
> Come faccio a dire "hai risorse illimitate, aspetta quanto devi, non
> prendere iniziative".
> 
> Il tutto e` su una Red Hat
> 
> Non sono neanche TROPPO sicuro di utilizzare mod_perl (anche se il 
> modulo e` caricato)...

stai usando CGI.pm? 

sul man c'è scritto:

       CGI.pm also has some simple built-in protections against
       denial of service attacks, but you must activate them
       before you can use them.  These take the form of two
       global variables in the CGI name space:

       $CGI::POST_MAX
           If set to a non-negative integer, this variable puts a
           ceiling on the size of POSTings, in bytes.  If CGI.pm
           detects a POST that is greater than the ceiling, it
           will immediately exit with an error message.  This
           value will affect both ordinary POSTs and multipart
           POSTs, meaning that it limits the maximum size of file
           uploads as well.  You should set this to a reasonably
           high value, such as 1 megabyte.



-- 
Franco Bagnoli (franchino) <franco.bagnoli@unifi.it> (bagnoli@dma.unifi.it)
virtual location: Dipartimento di Energetica "S. Stecco"
real location: Dip. Matematica Applicata "G. Sansone", Universita' Firenze,
Via S. Marta, 3 I-50139 Firenze, Italy. Tel. +39 0554796422, fax: +39 055471787
GPG Key fingerprint = 169D 9EA5 8FD3 7EDA E43A  9830 255F BCEC 0D63 3728




Maggiori informazioni sulla lista flug-tech