My partner ran this command through SSH.
This is the returned value: (as root)

[r...@s1 ~]# ulimit -a
> core file size          (blocks, -c) 0
> data seg size           (kbytes, -d) unlimited
> file size               (blocks, -f) unlimited
> pending signals                 (-i) 397311
> max locked memory       (kbytes, -l) 32
> max memory size         (kbytes, -m) unlimited
> open files                      (-n) 1024
> pipe size            (512 bytes, -p) 8
> POSIX message queues     (bytes, -q) 819200
> stack size              (kbytes, -s) 10240
> cpu time               (seconds, -t) unlimited
> max user processes              (-u) 397311
> virtual memory          (kbytes, -v) unlimited
> file locks                      (-x) unlimited
>


This is the output as the user files which runs my PHP files:

[fi...@s1 root]$ ulimit -a
> core file size          (blocks, -c) 0
> data seg size           (kbytes, -d) unlimited
> file size               (blocks, -f) unlimited
> pending signals                 (-i) 397311
> max locked memory       (kbytes, -l) 32
> max memory size         (kbytes, -m) unlimited
> open files                      (-n) 1024
> pipe size            (512 bytes, -p) 8
> POSIX message queues     (bytes, -q) 819200
> stack size              (kbytes, -s) 10240
> cpu time               (seconds, -t) unlimited
> max user processes              (-u) 397311
> virtual memory          (kbytes, -v) unlimited
> file locks                      (-x) unlimited
>

I have no idea which of these settings can have an effect on my script, if
you have any idea that would be highly appreciated :)

Thanks!

On Fri, Jun 5, 2009 at 10:10 PM, Marc Steinert <li...@bithub.net> wrote:

> Maybe your apache user is exceeding system limitations?
>
> For further detail have a look at
>
> http://www.ss64.com/bash/ulimit.html
>
> Greetings from Germany
>
> Marc
>
>
>
> Nitsan Bin-Nun wrote:
>
>> Hi List,
>>
>> I'm using the following code to output a file to the browser. Each file
>> size
>> is in the range of 5-10MB, all of them are MP3.
>>
>> header("Pragma: public");
>>
>>> header("Expires: 0");
>>> header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
>>> header("Cache-Control: public");
>>> header("Content-Description: File Transfer");
>>> header("Content-Type: {$info['mimetype']}");
>>> header("Content-Disposition: attachment;
>>> filename=\"{$info['filename']}\"");
>>> header("Content-Transfer-Encoding: binary");
>>> header("Content-Length: " . $info['size']);
>>>
>>> set_time_limit(0);
>>>
>>> $file =
>>>
>>> @fopen($config['storage'][$config['current_storage']].$info['md5'].".".$info['extension'],"rb");
>>> if ($file) {
>>>    while(!feof($file)) {
>>>        print(fread($file, 1024*8));
>>>        flush();
>>>        if (connection_status()!=0) {
>>>            @fclose($file);
>>>            die();
>>>        }
>>>    }
>>>    @fclose($file);
>>> }
>>>
>>
>>
>>
>> I'm running this script on a VPS which has a 10MBIT connection. When I
>> posted a link to this download stream php file about 50 users started
>> download it, then the script stopped from sending the whole file (for
>> instance, the file is 5MB, the script sends 2MB, 1MB and it continue this
>> way).
>>
>> In the apache log file I have seen these lines, but I have no idea what
>> are
>> their meaning:
>>
>> [Fri Jun 05 22:02:28 2009] [error] (12)Cannot allocate memory: fork:
>> Unable
>>
>>> to fork new process
>>> [Fri Jun 05 22:02:38 2009] [error] (12)Cannot allocate memory: fork:
>>> Unable
>>> to fork new process
>>> [Fri Jun 05 22:02:48 2009] [error] (12)Cannot allocate memory: fork:
>>> Unable
>>> to fork new process
>>> [Fri Jun 05 22:11:35 2009] [error] (12)Cannot allocate memory: fork:
>>> Unable
>>> to fork new process
>>>
>>>
>>
>> I have no idea what's going on. Any ideas to solve this issue will be very
>> appreciated. My 12K users are suffering right now, I would really really
>> appreciate any idea in the right direction :) :) :)
>>
>> Thank you!
>>
>>
>
> --
> Synchronize and share your files over the web for free
> http://bithub.net/
>
> My Twitter feed
> http://twitter.com/MarcSteinert
>
>
>
>
>

Reply via email to