Re: Netcgi buffers on /tmp

Gerd Stolpmann <[email protected]> Mon, 18 Jul 2011 12:41:31 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <1310985691.10871.92.camel@thinkpad>
Am Mittwoch, den 13.07.2011, 18:49 -0300 schrieb Matías Giovannini:
> Hello,
> 
> 
> I'm seeing something strange. Even though I configure the
> Nethttpd_plex service with Nethttpd_services.std_activation
> `Std_activation_unbuffered, I'm seeing an enormous number (more than
> 2.700.000 in one instance) of netcgiXXX temporary files with HTTP
> requests on /tmp. These files persist even after correctly shutting
> down the server with netplex-admin. This currently makes FreeBSD
> complain about a full /tmp filesystem.

What type of requests? Normally, this should only happen for file
uploads.

> I'd like to know if this is to be expected or not. Wouldn't it be
> possible to use the "tempfd" trick on Posix? Namely, the following:

I'm very aware of this, but for file uploads it is not applicable. The
handler normally wants to get the file by name.

There is cgi#finalize() to get rid of files. Maybe it's not called by
Nethttpd.

Gerd

> 
> 
> let tempfd () =
> let name = Filename.temp_file Sys.executable_name "TMP" in
> try
> let fd = Unix.openfile name [Unix.O_RDWR; Unix.O_CREAT] 0o600 in
> Unix.unlink name;
> fd
> with e -> Unix.unlink name; raise e
> 
> 
> so that the inode table doesn't get full?
> 
> 
> Thank you,
> Matías.
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric 
> Ries, the creator of the Lean Startup Methodology on "Lean Startup 
> Secrets Revealed." This video shows you how to validate your ideas, 
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________ Ocamlnet-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel

-- 
------------------------------------------------------------
Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany 
[email protected]          http://www.gerd-stolpmann.de
Phone: +49-6151-153855                  Fax: +49-6151-997714
------------------------------------------------------------


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel