| View previous topic :: View next topic |
| Author |
Message |
cannot_delete Voice
Joined: 24 Nov 2006 Posts: 31
|
Posted: Tue Aug 14, 2007 7:20 am Post subject: Error: too many open files |
|
|
Hi,
I get the following errors all the time:
| Quote: | 14/08/07@05:03.21> : couldn't execute "/usr/bin/ncftpput": too many open files
while executing
"exec /usr/bin/ncftpput -V -a -m -f /home/eggdrop/moxquiz/scripts/ftpserver.ftp /logs/timestats/ ~/$webscore"
(procedure "mx_userspeedsave" line 368)
invoked from within
"mx_userspeedsave"
(procedure "moxquiz_pubm" line 656)
invoked from within
"moxquiz_pubm $_pubm1 $_pubm2 $_pubm3 $_pubm4 $_pubm5"
14/08/07@05:03.27> : couldn't execute "/usr/bin/ncftpput": too many open files
while executing
"exec /usr/bin/ncftpput -V -a -m -f /home/eggdrop/moxquiz/scripts/ftpserver.ftp / ~/mox.html"
(procedure "mx_html" line 118)
invoked from within
"mx_html $newnick $host $handle $channel"
(procedure "moxquiz_on_nickchanged" line 10)
invoked from within
"moxquiz_on_nickchanged $_stnm1 $_stnm2 $_stnm3 $_stnm4 $_stnm5"
14/08/07@05:05.44> : couldn't execute "/usr/bin/ncftpput": too many open files
while executing
"exec /usr/bin/ncftpput -V -a -m -f /home/eggdrop/moxquiz/scripts/ftpserver.ftp / ~/mox.html"
(procedure "mx_html" line 118)
invoked from within
"mx_html $botnick "" "" $quizconf(quizchannel)"
(procedure "moxquiz_after_part" line 3)
invoked from within
"moxquiz_after_part"
14/08/07@05:05.45> : couldn't execute "/usr/bin/ncftpput": too many open files
while executing
"exec /usr/bin/ncftpput -V -a -m -f /home/eggdrop/moxquiz/scripts/ftpserver.ftp / ~/mox.html"
(procedure "mx_html" line 118)
invoked from within
"mx_html $botnick "" "" $quizconf(quizchannel)"
(procedure "moxquiz_after_part" line 3)
invoked from within
"moxquiz_after_part"
.
.
.
14/08/07@11:10.29> : moxquiz.mo.funpic.de: unknown host.
ncftpput: cannot open moxquiz.mo.funpic.de: unknown host.
while executing
"exec /usr/bin/ncftpput -V -a -m -f /home/eggdrop/moxquiz/scripts/ftpserver.ftp / ~/mox.html"
(procedure "mx_html" line 118)
invoked from within
"mx_html $botnick "" "" $quizconf(quizchannel)"
(procedure "moxquiz_after_part" line 3)
invoked from within
"moxquiz_after_part"
|
too many open files
The error occurs on random locations in the script. Unfortunately I can't find a file in the script that isn't closed after use. Reducing the files being opened doesn't seem to help. Is there a way to avoid the bot freezing due to this error other than restarting it all the time?
moxquiz.mo.funpic.de: unknown host.
this one is probably easier: how can I avoid to send a file to my webspace (per ftp) which ist temporarily down?
I hope my questions aren't too unspecific. If needed, here's the script: http://moxquiz.mo.funpic.de/test/moxquizz.txt
Thanks for your help!
-typ- |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Aug 14, 2007 2:29 pm Post subject: |
|
|
I had a quick look at the script, it seems to properly close every file it opens. I guess the problem is from the machine hosting your Eggdrop. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
cannot_delete Voice
Joined: 24 Nov 2006 Posts: 31
|
Posted: Tue Aug 14, 2007 3:11 pm Post subject: |
|
|
Thanks!
I consulted the bot-hoster, who told me the problem lies within the script. Is there a way to convince him of the opposite? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Aug 14, 2007 7:59 pm Post subject: |
|
|
| -typ- wrote: | Thanks!
I consulted the bot-hoster, who told me the problem lies within the script. Is there a way to convince him of the opposite? |
Unload all scripts; test one by one to see for certain which is the offender. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
cannot_delete Voice
Joined: 24 Nov 2006 Posts: 31
|
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Wed Aug 15, 2007 10:35 am Post subject: |
|
|
I guess one option might be to replace the open and close-commands with a proc featuring some debugging code; ie, rename open to _open, create a proc named open that calls _open, and tries to figure out number of opened files, where it was called from, and such.
Also, remember that sockets also make use of file descriptors, including the http-package..
Not sure this part might be to blame, but might be worth investigating:
| Code: | variable newquest ""
package require http
setudef flag weather
set agent "Mozilla/4.75 (X11; U; Linux 2.2.17; i586; Nav)"
bind pub - !qread pub_w
bind pub - !qinsert pub_i
bind pub - !qcorrect pub_c
proc pub_w {nick uhand handle chan input} {
global botnick agent datadir newquest
if {![isop $nick $chan]} {
mxirc_notc $nick "Du musst Op sein, um diese Funktion auszuführen"
return
}
mxirc_quick_notc $nick "Neue Fragen werden eingelesen. Sollte der Befehl nicht funktionieren, probier zunächst !rehash."
set query "http://moxquiz.mo.funpic.de/fragen/neue_fragen.txt"
set http [::http::config -useragent $agent]
set http [::http::geturl $query]
set html [::http::data $http]
set questtime "[unixtime].txt"
set fname "$datadir/backup/$questtime"
set newquest $fname
set fp [open $fname "a"]
foreach line [split $html "\n"] {
puts $fp $line
}
close $fp |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
cannot_delete Voice
Joined: 24 Nov 2006 Posts: 31
|
Posted: Sat Aug 18, 2007 11:35 am Post subject: |
|
|
| thx, I'll change my hoster and try that. |
|
| Back to top |
|
 |
|