Results 1 to 12 of 12
  1. #1
    Join Date
    Oct 2004
    Location
    Turkiye
    Posts
    47

    serving large files through apache

    hi guys,

    I am serving large files through apache web server. But in sometime apache stops to respond so I have to restart the web server.

    I can understand that this is a memory related problem. Alternatively i changed to transfer method to ftp, there was no problem then but for some reason I have use http while serving the files.

    I tried to add ram (1GB) but this did not fix the problem.

    I know that apache gets the file into memory and then sends it to client. I read about sendfile thing but I could not connect it with apache...

    Any suggestions and experiences will be very much appreciated

  2. #2
    Join Date
    Sep 2002
    Posts
    265
    how large is your file?

  3. #3
    Join Date
    Oct 2004
    Location
    Turkiye
    Posts
    47
    files are about 100MB with a total of 70GB

  4. #4
    Join Date
    Apr 2005
    Posts
    537
    hmmm, have you thought of setting up a second webserver app on a different port to server the files - you could then use a program that is less heavy on usage and ram than apache

    just my .2c

  5. #5
    Join Date
    Jan 2005
    Location
    San Francisco/Hot Springs
    Posts
    991

    Re: serving large files through apache

    Originally posted by eL-ankebut

    I am serving large files through apache web server. But in sometime apache stops to respond so I have to restart the web server.
    Sounds like you don't have enough apache server processes available.
    Bump up the "MaxClients" number, and/or check out mod_ioboost which will immediately free up apache to do other stuff rather than serve up the big files.
    AppliedOperations - Premium Service
    Bandwidth | Colocation | Hosting | Managed Services | Consulting
    www.appliedops.net

  6. #6
    Join Date
    Oct 2004
    Location
    Turkiye
    Posts
    47
    Originally posted by NWSTech
    hmmm, have you thought of setting up a second webserver app on a different port to server the files - you could then use a program that is less heavy on usage and ram than apache

    just my .2c
    yes i tried to use thttpd but the same problems occurred again, can you recommend another web server software?

  7. #7
    Join Date
    Apr 2005
    Posts
    537
    not off the top of my head, but could you not setup anonymous ftp and link to the files that way ?

  8. #8
    Join Date
    Oct 2004
    Location
    Turkiye
    Posts
    47

    Re: Re: serving large files through apache

    Originally posted by wotanworks
    check out mod_ioboost which will immediately free up apache to do other stuff rather than serve up the big files.
    I've tried to search mod_ioboost in google which turned out nothing. A search on ioboost gave a few results but i didnt work out.

    Can you please post here the url of website where i can find it

    thanks

  9. #9
    Join Date
    Apr 2005
    Location
    Holland
    Posts
    124

    Re: Re: Re: serving large files through apache

    Originally posted by eL-ankebut
    I've tried to search mod_ioboost in google which turned out nothing. A search on ioboost gave a few results but i didnt work out.

    Can you please post here the url of website where i can find it

    thanks
    mod_boost and MaxClients are values that can be adjusted in httpd.conf on your server.

    I would also suggest tweaking up your Apache before concidering other webservers, as I suspect you'll end up with more-less same problem.

    I am not 100% sure, but I think you can instruct Apache to send files, if not directly, but then to lower the memory buffer before sending files (like, load 1% of file in memory (which would be like 1 mb, if file is 100MB) and then send it, then load again 1% etc etc etc).

    Also take a look at: http ://httpd.apache.org/ docs-2.0/mod/core.html#enablesendfile

    (dunno, what files are 'static' nor what files are you offering for download).

    And just one suggestion, try (costs nothing to mail people @tucows, download.com etc to get you started in good direction (will certanly not offer you complete solution, but...)

    Cheers,
    Aleks
    Last edited by SmilieBG; 04-28-2005 at 10:43 AM.

  10. #10
    Join Date
    Jan 2005
    Location
    San Francisco/Hot Springs
    Posts
    991

    Re: Re: Re: Re: serving large files through apache

    Originally posted by SmilieBG
    mod_boost and MaxClients are values that can be adjusted in httpd.conf on your server.
    mod_ioboost is not a standard module, its commercial in fact
    I'll dig up their info, the module is awesome.
    AppliedOperations - Premium Service
    Bandwidth | Colocation | Hosting | Managed Services | Consulting
    www.appliedops.net

  11. #11
    I would try changing the MaxClients. By default apache has a small value for MaxClients, I forget what it is though.
    But once you do this more people can connect at a time and since you are serving large files once one person is connected they are there for a long time.
    Semi-managed dedicated servers at unmanged prices, visit www.bit42.com

  12. #12
    Join Date
    Oct 2004
    Location
    Turkiye
    Posts
    47
    thanks for all posts..

    after installing lingerd everything seems fine now..

    maxclients was already at 1024

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •