rejetto forum

Software => HFS ~ HTTP File Server => Beta => Topic started by: m3gab0y on October 30, 2009, 07:39:31 PM

Title: stability
Post by: m3gab0y on October 30, 2009, 07:39:31 PM
It still has the bug of crashing with large files.

I have folder with ~8k mp3 files and it hangs up with full load on the CPU.
Title: stability
Post by: bacter on October 30, 2009, 11:43:09 PM
hi m3gab0y

Quote
It still has the bug of crashing with large files.

I have folder with ~8k mp3 files and it hangs up with full load on the CPU.

I've tested with recursive listing with about 15k files - Pages were generated, also depending of the template used, build time grow in some cases to more than 2 minutes (on quad 2.3Ghz CPU, 3.5 GB RAM) !

I don't have any old browser (use firefox3.5, Opera10, Chrome, ie8) to check and confirm, but i know that some older browsers didn't allow pages with more than 32 kpixels length.

Please explain what browser you use and what crashes (browser?, hfs?, windows?).



Title: stability
Post by: Kremlin on October 31, 2009, 01:07:17 AM
My biggest problem is still the overload of connections crashing the program (it freezes perminantely with the 'non responding' message). When i say overload i mean 200+. Even if i limit the server for 1 connection per IP, anyone with a download manager could easily send 100+ requests (that are rejected) at the same time and still make it crash. What i would ask for would probably be a little more resistance from the program, otherwise the only solution would be using secondary programs like firedaemon which will reboot hfs every 'x' hours.  :-\

PS. the pc which runs HFS has also a pretty good CPU, RAM, etc.. so the issue probably isn't coming from that direction.
PS2. keep up the good work rejetto  ;)
PS3. forgot something, I know i've already asked for this a few months back, but would it be possible to allow banned users to still access a certain folder? this request is due to the page template appearing disfigured to them since they can't access the /template/ folder. This way it would be optional for whoever is managing their hfs server to give them access or not.
Title: stability
Post by: jerome on November 01, 2009, 06:58:53 AM
Quote
(it freezes with the 'non responding' message)

especially when a bot send the GET request, some are more reactive.
also during a recursive listing request.

HFS is not manageable during this step, you only must wait the response from HFS to continue your changes.

if 3 people ask a recursive listing at the same time + use a download manager with unlimited slot option on.
sure it will not be cool to administrate.
Title: stability
Post by: bacter on November 02, 2009, 11:37:13 AM
Hi Kremlin:

To your PS3: A banned user is supposed to be banned  :D
Therefore he should not have any access to any folder. But there is at least a solution to avoid ugly screens because he has no access to files required by the template. You can change the section [error-page] of your template with a and a small piece of html. For example this way:

Code: [Select]
[error-page]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
[color=blue]{.if not|{.=|%reason%|banned.}|{:[/color]
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  . . / / let this content here as it is / / . . . . .
</html>
[color=blue]:}|
{: <div style="position:absolute;left:300px;top:250px;height:180px;width:400px;padding:6px;
background-color:red;font-size:34px;color:white">
<center>* * * * *<br />You are banned<br />from this server<br />* * * * *</center>
</div>
:}.}[/color]

This gives you a clear screen with the banned message instead of a scrambled template. ;)
Title: stability
Post by: r][m on November 02, 2009, 03:32:24 PM
Another way to style a banned page.
Code: [Select]
[ban]
[color=blue]<style>
{.load|/path to your/style.css.}
</style>[/color]
<h4> IP Address %ip% Has Been Blocked </h4>
<h4>%reason%</h4>
Title: stability
Post by: Kremlin on November 03, 2009, 01:58:12 AM
Tks guys  :D

ps. bacter you have a mistake in the code when you place a macro within the {.if not|....} macro, you need to place {: instead of {.
Title: stability
Post by: Mars on November 03, 2009, 08:22:07 PM
Quote
ps. bacter you have a mistake in the code when you place a macro within the {.if not|....} macro, you need to place {: instead of {.

I notice no mistake, can you be more precise in your assertion, and where exactly?
Title: stability
Post by: Kremlin on November 04, 2009, 04:41:04 AM
My mistake, still not used to using : and . with the macro's, anyway bacter actually put me in the right direction but now I think I have a logic problem. I will post it on another sub-forum where it's more appropriate tommorow.
Title: stability
Post by: Mars on November 04, 2009, 10:31:44 AM

{.IF (NOT) | PAR0 |{: PAR1 :}|{: PAR2 :} .}

The first parameter PAR0 is either TRUE or FALSE, it can be the result of a macro, but it has never to be quoted.

the two last, PAR1 and PAR2 have to be quoted, if they contain some macro which must not be estimated before knowing the final value of PAR0

use this first macro
{.if not|{.=|%reason%|banned.}
          | {.add to log| reason= banned.}
          | {.add to log| reason= other.}     
/if}

and see what difference give this second
{.if not|{.=|%reason%|banned.}
          |{: {.add to log| reason= banned.} :}
          |{: {.add to log| reason= other.} :}
/if}


{.=|%reason%|banned.}  is evaluated to TRUE or FALSE

 ;)
Title: stability
Post by: Kremlin on November 05, 2009, 07:03:41 PM
Not wanting to takeover this topic but i'll just leave this here: http://www.rejetto.com/forum/index.php?topic=7730.0 (http://www.rejetto.com/forum/index.php?topic=7730.0)

In the link I further explain the ban page issue, and make a suggestion to rejetto which might be quite simple to do.  :)

PS. tks mars, i'm trying some stuff with your macro's instructions
Title: stability
Post by: rejetto on November 14, 2009, 04:12:04 PM
I have folder with ~8k mp3 files and it hangs up with full load on the CPU.

please, try to understand if there are only some files that cause the problem.

anyway, keeping so much files in the same folder is bad for many reasons.
you should put them in folders.
it's good if you don't go much over 1000.
Title: stability
Post by: rejetto on November 14, 2009, 04:19:40 PM
if 3 people ask a recursive listing at the same time + use a download manager with unlimited slot option on.

i'm sorry for this problem, but it's not totally solvable without multithread, because "simply" searching the hard disk is very intensive for the computer.
HFS is not multithreaded, and it's hard and long to make it now.
I don't if it's possible for a program like HFS to make use of the indexing system offered by Windows. I will investigate on this.
Title: stability
Post by: rejetto on November 14, 2009, 04:24:50 PM
My biggest problem is still the overload of connections crashing the program (it freezes perminantely with the 'non responding' message). When i say overload i mean 200+. Even if i limit the server for 1 connection per IP, anyone with a download manager could easily send 100+ requests (that are rejected) at the same time and still make it crash. What i would ask for would probably be a little more resistance from the program, otherwise the only solution would be using secondary programs like firedaemon which will reboot hfs every 'x' hours.  :-\

Sadly, I don't expect HFS to be very robust. It was designed for personal use, and not for such heavy loads. Indeed, I addressed mainly usability problems in place of performance issues.
About your problem, my idea is that the connections you say "rejected", i guess are actually served with a page reporting the "overload" in place of the requested file. Is it so?
If yes, we may workaround your problem by just discarding those connections.
The quickest method that comes at hand is to put a {.disconnect.} command inside the [overload] section of the template.
This is not the fastest way, but may already be enough. Please, give me a feedback about this.
Title: Re: stability
Post by: Kremlin on December 23, 2009, 12:28:13 AM
No, it's not due to the overload page, because it's outside the users browser (connections are coming from the download manager and not the browser). At least I don't think you send html code from the [overload] section to the download manager.
Title: Re: stability
Post by: rejetto on December 23, 2009, 11:11:50 PM
the download manager doesn't show the pages, but it works just as a browser.
Title: Re: stability
Post by: Roessi on December 24, 2009, 11:54:02 AM
tested a folder with 8k mp3 and 1k subfolders hfs hung up for about 5min and then page generated succesfully :)
3.2 GHZ dualcore and 4GB ram
Title: Re: stability
Post by: Kremlin on December 24, 2009, 03:16:40 PM
I will try the new [overload] section when I return from holidays, sorry for the previous late reply rejetto (didn't remember the topic). I will give more info afterwards.