cgi file limit size?

Discussion in 'Python' started by davidj411, Apr 6, 2009.

  1. davidj411

    davidj411 Guest

    I am wondering where the limitation of filesize comes from when i
    upload a large file.
    it uploads when the filesize is less than 20 MB (but not if larger).
    the script does not limit the filesize so it is either an HTTP
    specification or a webserver limit, right?
    maybe my connection to the server is timing out during the upload?
    web server is IIS 6.0.
    python is 2.5.2.
    IIS webmapping does not use "-u" b/c nothing works when that option is
    used.
     
    davidj411, Apr 6, 2009
    #1
    1. Advertising

  2. davidj411 <> wrote:
    > I am wondering where the limitation of filesize comes from when i
    > upload a large file.
    > it uploads when the filesize is less than 20 MB (but not if larger).
    > the script does not limit the filesize so it is either an HTTP
    > specification or a webserver limit, right?
    > maybe my connection to the server is timing out during the upload?
    > web server is IIS 6.0.
    > python is 2.5.2.
    > IIS webmapping does not use "-u" b/c nothing works when that option is
    > used.


    What are you using to do the upload? What error message do you get?

    --
    R. David Murray http://www.bitdance.com
     
    R. David Murray, Apr 7, 2009
    #2
    1. Advertising

  3. davidj411

    davidj411 Guest

    i am using these modules:

    import cgi,time
    import cgitb; cgitb.enable()

    iis webmapping now works with -U (key was to remove '-u' from the
    grouping of "s"'s:
    C:\Python25\python.exe -u "%s %s"

    here is the form html code:
    <form action="upfile.py" method="POST" enctype="multipart/form-
    data">Server name:<INPUT type="text" name="servername">
    <BR>
    File name:<input name="file_1" type="file"><br>
    <input name="Submit" type="submit" value="Upload File">
    </form>

    i increased the timeout on the IIS server to 2,200 seconds and i can
    now upload a file that is 220 MB in size in about 350 seconds.

    if i try to upload a 300 MB file, i get the dreaded CGI bad headers
    message,
    "CGI Error
    The specified CGI application misbehaved by not returning a complete
    set of HTTP headers."

    the headers are always the same:
    print "Content-type: text/html\n"
    print HTML_TEMPLATE

    in the IIS log, i do see http error 400 with sc-win32-status of 64
    this link explains 400 errors a little - >http://www.checkupdown.com/
    status/E400.html

    httperr log shows "BadRequest DefaultAppPool"

    this link explains this particular case a little: ->
    http://objectmix.com/inetserver/284871-re-sc-status-400-sc-win32-status-64-what-causes.html
     
    davidj411, Apr 9, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben

    File size limit?

    Ben, Nov 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    457
  2. Don
    Replies:
    12
    Views:
    25,659
  3. Replies:
    1
    Views:
    1,116
    Victor Bazarov
    Jun 28, 2005
  4. Amod
    Replies:
    1
    Views:
    447
    Jonathan Mcdougall
    Nov 14, 2005
  5. Amod
    Replies:
    1
    Views:
    416
    Jonathan Mcdougall
    Nov 14, 2005
Loading...

Share This Page