Re: FATAL: erealloc(): Unable to allocate 577925121 bytes

From: Brian Candler (B.Candler_at_pobox.com)
Date: 09/27/05

  • Next message: Steve Rieger: "Re: FATAL: erealloc(): Unable to allocate 577925121 bytes"
    Date: Tue, 27 Sep 2005 13:42:57 +0100
    To: Steve Rieger <steve.rieger@tbwachiat.com>
    
    

    > as far as i can see i am not doing anything wrong, then why cant i
    > download a 551 MB file

    You're probably hitting the default 512MB maximum process data segment limit
    somewhere, I guess on the client end as I would expect Apache to use
    sendfile() to transmit a large file. Try typing:

    $ ulimit -a
    core file size (blocks, -c) unlimited
    data seg size (kbytes, -d) 524288 << THIS LIMIT
    file size (blocks, -f) unlimited
    max locked memory (kbytes, -l) unlimited
    max memory size (kbytes, -m) unlimited
    open files (-n) 11095
    pipe size (512 bytes, -p) 1
    stack size (kbytes, -s) 65536
    cpu time (seconds, -t) unlimited
    max user processes (-u) 5547
    virtual memory (kbytes, -v) unlimited

    Now, I can never remember how to increase this, and I always have to rummage
    around the kernel source code. Ah yes, it's

    options MAXDSIZ=(1024UL*1024*1024)

    in the kernel configuration. See /usr/src/sys/conf/NOTES

    However, it seems to me that's the wrong thing to do here. If an application
    needs to download 1G of data, then it really should download it and spool it
    to disk as it goes, not spool it all into RAM and then finally write it to
    disk (or worse, spool it into RAM, which gets spooled to swap space on disk,
    which then later gets pulled back into RAM and then finally written to the
    filesystem). At least, that's a very poor utilisation of system resources.

    Regards,

    Brian.
    _______________________________________________
    freebsd-isp@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-isp
    To unsubscribe, send any mail to "freebsd-isp-unsubscribe@freebsd.org"


  • Next message: Steve Rieger: "Re: FATAL: erealloc(): Unable to allocate 577925121 bytes"

    Relevant Pages