Re: [AOLSERVER] Problem uploading HUGE files. Possible AOLServer bug

2011-05-16 Thread Jeff Rogers
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

Eduardo Santos wrote:

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.




--
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.


[AOLSERVER] 2Gb log file problem

2011-05-16 Thread Alexey Pechnikov
With 2Gb size of log file all scripts don't work and the log file
don't growing. Only static files are serves

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/


--
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.


Re: [AOLSERVER] 2Gb log file problem

2011-05-16 Thread Jeff Rogers
The log module supports rolling.  Normally it is done daily, but if your 
logs are growing too quickly and hitting 2G within a day you could set 
up a cronjob to send the server a signal to roll the logs, or a 
scheduled task within the server to roll the logs every hour, or when 
they reach a certain size.  The command to roll the logs is 
[ns_accesslog roll]


-J

Alexey Pechnikov wrote:

With 2Gb size of log file all scripts don't work and the log file
don't growing. Only static files are serves




--
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.


Re: [AOLSERVER] 2Gb log file problem

2011-05-16 Thread Alexey Pechnikov
2011/5/17 Jeff Rogers dv...@diphi.com:


Undocumented behaviour is bug, isn't it?

-- 
Best regards, Alexey Pechnikov.
http://pechnikov.tel/


--
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.


Re: [AOLSERVER] 2Gb log file problem

2011-05-16 Thread Jeff Rogers

Alexey Pechnikov wrote:

2011/5/17 Jeff Rogersdv...@diphi.com:




Undocumented behaviour is bug, isn't it?



I didn't suggest that it wasn't, I only offered a possible workaround 
for you to solve the immediate problem facing you.


There is a bugtracker for aolserver at sf where you can file bugs, 
although there's no guarantee ho quickly any of them will get looked at 
or resolved.


http://sourceforge.net/tracker/?func=browsegroup_id=3152atid=103152

-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.