[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] [RaQ4] "Too many open files" sending mail



Hello,

We need to send more than 2000 mails with a php script. We use the "mail"
function.

The script stops at about 180 mails sent. I have the system message "Too
many open files".

The same problem appears with this shell script :

#!/bin/sh
f=0
g=1000
while [ $f -le $g ]
        do
        f=`expr $f + 1`
        echo $f
        echo "salut"
        ls -al | mail -s test-unix me@xxxxxxxxxx
        done


I tried to increase the max number of open files (# ulimit -n 8192, am I
wrong ?), with same bad results.
If I put a "sleep 2" on the loop, everithing is working fine, but this is
not a solution....

Any idea ?



Pierre-Alain PULFER
Ingénieur système
---------------------------------------------------------
Télévision Suisse Romande
20, quai Ernest-Ansermet	tél : (+4122) 708 94 54
CH-1205 Genève		fax: (+4122) 708 98 26

E-Mail : Pierre-Alain.Pulfer@xxxxxx