Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problem uploading HUGE files. Possible AOLServer bug
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Eduardo Santos  
View profile  
 More options Apr 20 2011, 9:22 am
From: Eduardo Santos <eduardo.edusan...@GMAIL.COM>
Date: Wed, 20 Apr 2011 10:22:31 -0300
Local: Wed, Apr 20 2011 9:22 am
Subject: [AOLSERVER] Problem uploading HUGE files. Possible AOLServer bug

Hi everybody,

My system have very specific needs to upload really large files sometimes.
My upload limit is actually 400MB, but I've received a request to raise this
value to 2GB.

I'm using AOLServer 4.5.1 and I know this is based on ns_limits command. So,
I used the following piece of code to raise the upload size:

set max_file_upload_mb 2500
set size [expr $max_file_upload_mb * 1024 * 1024]
ns_limits set default -maxupload $size

However, the response was completely unexpected:

nrunning 3 nwaiting 0 ntimeout 0 ndropped 0 noverflow 0 maxwait 100
maxupload -1673527296 timeout 60 maxrun 100

*maxupload* had a negative size! I started digging up in C source code from
AOLServer, and I guess I've found the problem. In the file nsd/limits.c we
have the following piece of code:

    int i, val;
    static CONST char *opts[] = {
        "get", "set", "list", "register", NULL
    };
    enum {
        LGetIdx, LSetIdx, LListIdx, LRegisterIdx
    } opt;
    static CONST char *cfgs[] = {
        "-maxrun", "-maxwait", "-maxupload", "-timeout", NULL
    };

(...)
            switch (cfg) {

                case LCUploadIdx:
                    limitsPtr->maxupload = val;
                    break;

            }
        }

It seems like *maxupload* receives the value from *val*, wich is an int var.
If I'm not wrong, the maximum value for C int vars is 2,147,483,647, and I
was trying to setup this value to 2,621,440,000, wich seems to be causing an
overflow.

Considering all this, if I just change the line below everything should
work, right?

    int i, val;

I could just use:

    int i;
    bigint val;

Did I say something wrong or this line of thinking make any sense?

--
Eduardo Santos
Analista de Sistemas

http://eduardosan.wordpress.com
http://twitter.com/eduardosan

--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Rogers  
View profile  
 More options May 16 2011, 2:22 pm
From: Jeff Rogers <dv...@DIPHI.COM>
Date: Mon, 16 May 2011 11:22:07 -0700
Local: Mon, May 16 2011 2:22 pm
Subject: Re: [AOLSERVER] Problem uploading HUGE files. Possible AOLServer bug
You could set the max upload value to INT_MAX (2^31-1, as you have
below), and that should work, but going higher will be difficult.
Simply changing the variable to a long in one place is insufficient,
because that value is handled in quite a few places, and you'd need to
change all of them; the obvious one is the Limits structure referenced
in the code snippet you have, but there's also buffer sizes and scanf
formats (to read the upload size from the http request) to handle, and
probably a few others as well.

-J

--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eduardo Santos  
View profile  
 More options May 17 2011, 8:20 am
From: Eduardo Santos <eduardo.edusan...@GMAIL.COM>
Date: Tue, 17 May 2011 09:20:30 -0300
Local: Tues, May 17 2011 8:20 am
Subject: Re: [AOLSERVER] Problem uploading HUGE files. Possible AOLServer bug

Hi Jeff,

Thank you for the answer. I was thiking that such a problem really exists,
and that's why I decided not to touch the source code on this.

It seems to me a bad thing to have a such low limit for file uploads. As I
don't know this implementation, do you think there's any other way we can
increase the file upload limit?

2011/5/16 Jeff Rogers <dv...@diphi.com>

--
Eduardo Santos
Analista de Sistemas

http://eduardosan.wordpress.com
http://twitter.com/eduardosan

--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Rogers  
View profile  
 More options May 23 2011, 9:07 pm
From: Jeff Rogers <dv...@DIPHI.COM>
Date: Mon, 23 May 2011 18:07:14 -0700
Local: Mon, May 23 2011 9:07 pm
Subject: Re: [AOLSERVER] Problem uploading HUGE files. Possible AOLServer bug

Eduardo Santos wrote:
> Hi Jeff,

> Thank you for the answer. I was thiking that such a problem really
> exists, and that's why I decided not to touch the source code on this.

> It seems to me a bad thing to have a such low limit for file uploads. As
> I don't know this implementation, do you think there's any other way we
> can increase the file upload limit?

I think someone else was looking at uploading large files last year.
The problem they were running into was that unless your link is fast the
browser (particularly IE) times out waiting for a response, even though
it hasn't finished uploading yet.  I would not be surprised if you
encounter similar problems.

You (and your users) may find it more pleasant to use a upload tool that
automatically breaks the file into multiple parts for uploading, and the
server re-combines them after the upload is complete.  For example,
Plupload appears to support this. http://www.plupload.com/

(I've not used plupload, it was just the first hit I got from a search).

-J

--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »