rejetto forum
May 26, 2012, 02:05:37 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Download Accelerator Prevention  (Read 742 times)
0 Members and 2 Guests are viewing this topic.
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« on: October 04, 2011, 03:48:22 PM »

When HFS is set to prevent Download Accelerators, it responds with a 503 - Overload.  Can you make a way to have these events not show in the log?  At the same time I do want to see other not-served requests, such as 403s and 404s.  Reason I ask is because ~95% of my hits in the past 2 days were refused because they were duplicates from download managers.  Obviously this makes my log very difficult to read.

Thanks,
Ray
« Last Edit: October 04, 2011, 07:32:41 PM by raybob95 » Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #1 on: October 06, 2011, 12:26:23 AM »

Does your template have a [overload] section in error-page section?
If so would [overload|no log] work?

Actually, the error pages don't appear to log here at all, now I'm
trying figure out why  Smiley
« Last Edit: October 06, 2011, 12:35:04 AM by r][m » Logged
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« Reply #2 on: October 06, 2011, 06:31:45 PM »

Nope... lines like this keep appearing over and over again....

10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Requested GET /.(username)/shared/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX----file.extension
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Not served: 503 - Overload
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Requested GET /.(username)/shared/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX----file.extension
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Not served: 503 - Overload
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Requested GET /.(username)/shared/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX----file.extension
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Not served: 503 - Overload
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Requested GET /.(username)/shared/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX----file.extension
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Not served: 503 - Overload
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Requested GET /.(username)/shared/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX----file.extension
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Not served: 503 - Overload
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Requested GET /.(username)/shared/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX----file.extension
10/6/2011 7:34:22 PM XX.XX.XX.XX:38696 Not served: 503 - Overload
« Last Edit: October 06, 2011, 06:35:10 PM by raybob95 » Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #3 on: October 07, 2011, 12:09:03 AM »

What tpl are you using?
Or do you mean [overload|no log] doesn't work?
Logged
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« Reply #4 on: October 07, 2011, 10:30:24 AM »

Using [overload|no log] has not effect.

One thing that would be nice and would solve this problem as well as save a lot of CPU would be to simply disconnect w/o reply when multiple connections like that are opened up.... I find that my GUI only freezes up when some download manager opens up like 50 connections per second and HFS refuses 49 of them but still responds to all...

I'm sure there's some way to do it with macros (most of my other problems have been solving with scripting)  Wink


EDIT:

Just a quick thought (I'll test this later) perhaps something along the lines of this would work.... (I'm sure there's a much better way to do it)

When a new download opens, HFS saves a file saying that that person is downloading that file.  Upon completion it deletes it.  If the file already exists (is being downloaded) then they get disconnected.

Code:
[download]
{.if|{.exists|%ip%-%item-name%.txt.}|{:{.disconnect.}:}|
{:{.save|%ip%-%item-name%.txt|.}:}.}

[download completed]
{.delete|%ip%-%item-name%.txt.}

One problem I thought of though is that if the user cuts off the download half way through the file would not be deleted and they would never be able to access their download again...  I'm sure I could somehow use the [disconnected] section to fix this somehow...
« Last Edit: October 07, 2011, 10:54:08 AM by raybob95 » Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #5 on: October 07, 2011, 11:13:13 AM »

OK, I see. The logging is just a nuisance, the real problem are the connections.
I guess the Prevent leaching (download accelerators) feature in Limits doesn't help either?

Myself I wouldn't spend a lot of time developing a script, I'd just notify the user
to stop, or I'd ban their IP with a disconnect. I'd tell them they do have the option of using Archive.
« Last Edit: October 07, 2011, 11:33:41 AM by r][m » Logged
rejetto forum
« Reply #5 on: October 07, 2011, 11:13:13 AM »

Do you like this software? Consider even $2
 Logged
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« Reply #6 on: October 07, 2011, 11:31:05 AM »

I can't very well block them in any way since it's not just DL managers that do it but also apparently IE9 and IE8 and possibly Chrome too...


EDIT:

I'm gonna give this a test-run:

Code:

[download]
{.if|{.exists|C:\documents and settings\admin\desktop\Current Downloads\%ip%-%item-name%.txt.}|{:{.disconnect.}:}|
{:{.save|C:\documents and settings\admin\desktop\Current Downloads\%ip%-%item-name%.txt|.}:}.}

[download completed]
{.delete|C:\documents and settings\admin\desktop\Current Downloads\%ip%-%item-name%.txt.}

[disconnected]
{.if|{.exists|C:\documents and settings\admin\desktop\Current Downloads\%ip%-%item-name%.txt.}|{:{.delete|C:\documents and settings\admin\desktop\Current Downloads\%ip%-%item-name%.txt.}:}.}
« Last Edit: October 07, 2011, 11:40:33 AM by raybob95 » Logged
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« Reply #7 on: October 07, 2011, 11:38:42 AM »

Hmmm well that script does it job but it apparently doesn't lessen HFS' CPU load or help responsiveness at all nor does it remove the GET lines from the log, only the 503 reponses.

This might need to be coded into the software to work right.

BTW, based on my log and logging the user-agents, it seems as if IE8 and IE9 are the only ones that automatically try to open up a ton of download connections at once, every other browser does it normally.  I think it might only be that it does it when loading files embedded into web-pages though (like JS, CSS, etc.)

Just a side note, today when I walked over to my computer I looked and saw that there were 55 download icons in the system tray and that HFS would not respond.... I went into Firefox and refreshed my page and it said it couldn't connect.  Sound like an overload crash?

Perhaps I should limit the amount of hot-linking each user gets (my ratio of downloads to user accounts is well in excess of 300:1)

EDIT:
It seems as if the extreme connection acceleration in IE only happens when trying to download a certain SWF files...

EDIT 2:
I think the problem might just be that the user embedded the SWF file into their page multiple times... I'm gonna go investigate their code.


I guess my main problem here is not how annoying the log is but that since HFS takes the time to respond to the repetitive connections and execute the macros under [request] for them rather than just disconnecting without reply, it takes up a lot of CPU time and slows down the server, a lot.

What tpl are you using?

Not that it's relevant but I actually use several different templates based on section... the Global Template is >200KB in size  Grin
VFS, Events, all Templates, TXT Files in use by HFS, etc., amounts to over 700KB 
« Last Edit: October 10, 2011, 08:56:50 PM by raybob95 » Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #8 on: October 23, 2011, 08:04:10 AM »

instead of using the files, documentation says
Example: {.current downloads|user=%user%|file=this.} will tell you how many connections this user is using to download this same file.

see if you can use this in [request] that comes first
otherwise in [download]
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 22, 2012, 03:14:30 AM
anything