Operating System - HP-UX
1820254 Members
2631 Online
109622 Solutions
New Discussion юеВ

iPlanet file upload premature timeout

 
SOLVED
Go to solution
Kieran Ryan
New Member

iPlanet file upload premature timeout

Hi, I am using HP11 and iPlanet web server. When trying to upload files over HTTP using FORM ENCTYPE="multipart/form-data" that are bigger than a few Kilobytes i get a 408 error. (client timeout). It is as if the server has decided that the client has timed out during the file upload. The default setting is 30 seconds for AcceptTimeout in the magnus.conf file. This should be ample to get the file across, even increasing this to 2 minutes just produces the same error after 2 minutes. Any help appreciated. Apologies if this is not the correct forum for this, I couldn't see one for iPlanet and Web, many thanks, Kieran.
8 REPLIES 8
Steven Gillard_2
Honored Contributor

Re: iPlanet file upload premature timeout

Are there any other errors in iPlanet's error log file? Have you tried running a network trace to find out whats actually going on?

Regards,
Steve
Rita C Workman
Honored Contributor

Re: iPlanet file upload premature timeout

I found a couple things, maybe one will be of some help.
First thread mentions about setting timeout and size:
http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1784.html

Second about analysing 408:
Analysing 408 errors

This error is highly unlikely to occur, because there is usually only a tiny interval of time
(milliseconds) between our 1) opening of the socket and 2) writing the HTTP data stream
through that socket. In exceptional circumstances, this interval may increase because of
some operations on providers computer systems e.g. we temporarily suspend an executing
process and this happens immediately after the socket was created. Or the two steps may
follow quickly on our systems, but the second step encounters an unreasonable delay on
the Internet. The acceptable interval between the two steps could also be set very low on
your Web server e.g. your server is very busy, and has become a bit 'impatient' with
attempted connections it views as a bit slow.

Any of these conditions may generate an 408 error. But they are all fairly unlikely to
occur. In normal IP communications, the time interval between the two steps should be
much less than 10 seconds, which should be completely acceptable to your Web server.


/rcw
Kieran Ryan
New Member

Re: iPlanet file upload premature timeout

Have checked ping and traceroute can see nothing unusual. Packets are sent to our firewall and then to our webserver with no problems. Seems that files other than very small ones (less than 5k or so) cause this timeout. Uploads to other servers using the same protocol and method are fine...This is a new HP11/iPlanet server which is being readied and tested for Production. Thanks very much for the replies so far! (Kieran)
Steven Gillard_2
Honored Contributor
Solution

Re: iPlanet file upload premature timeout

I recommend you get a full dump of the packets being sent from the PC. You can do this using nettl on HPUX.

# nettl -tn pduin pduout -e ns_ls_ip -tm 10000 -f trace -s 1024

That will start tracing to a file called "trace.TRC0" in the current directory. The size of the trace will be limited to 10Meg. Since this is not a production system that should be big enough.

Next, run the test from your client PC. Then stop tracing:

# nettl -tf -e all

Now you need to format the trace file. Create a file called "filter" with the following lines:

filter ip_saddr
filter ip_daddr

And run the following command:

# netfmt -lnN -c filter trace.TRC0 | more

That will dump all packets to and from the client PC. Hopefully from there you can get a better idea where things are going wrong - at least you'll know if its a real timeout or whether there's possibly something else wrong on the iPlanet side.

Regards,
Steve
Kieran Ryan
New Member

Re: iPlanet file upload premature timeout

Thanks for the network tracing this was very helpful. Proves the network is not the problem. However have found that even a large textarea fails to send! Seems to be a limit on the size of the POST than can be sent via the form. just happened that the file transfer was the first thing I noticed. still searching....
Christopher Caldwell
Honored Contributor

Re: iPlanet file upload premature timeout

Actually, it's the other way around. GETs happen through the environment; GETs have a system/server/client dependent size (it's usually around 1K). POSTs occur through sockets - their limit is "large".

What's your form action?
Kieran Ryan
New Member

Re: iPlanet file upload premature timeout

Yes I am using POST but seems to be a limit of the data that can be posted whether text area or file upload the result is the same... Here is the simple form.
ACTION="/cgi-bin/docupldt.cgi" METHOD="POST">

Please attach a file with your event log.

File name:


Christopher Caldwell
Honored Contributor

Re: iPlanet file upload premature timeout

Make sure you're reading in Content-length bytes fron STDIN.
Check to make sure the script hasn't imposed a limit:


Many scripts have a line like
### Set Maximum Upload size to 2MB (prevent ppl from uploading
extremely large files or other such malicious stuff)
$CGI::POST_MAX = 2048;

If you're trying to read the whole file into memory, you may be running into a ulimit.

Here's some sample scripts/techiques
http://www.arq.net/~chogg/httpupload.htm
http://stein.cshl.org/WWW/software/CGI/