Re: Fwd: socket: Too many open files

2018-10-14 Thread Cameron Simpson
On 14Oct2018 20:24, Shakti Kumar wrote: On 13Oct2018 14:10, Shakti Kumar wrote: I’m running a script which basically does a traceroute to the list of hosts provided, and then pulls up some info by logging in to gateways in the path. I am running this script for a list of almost 40k hosts in

Fwd: socket: Too many open files

2018-10-14 Thread Shakti Kumar
>On 13Oct2018 14:10, Shakti Kumar wrote: >>I’m running a script which basically does a traceroute to the list of >>hosts >>provided, and then pulls up some info by logging in to gateways in the path. >>I am running this script for a list of almost 40k hosts in our data centers. >>Also, I am using

Re: socket: Too many open files

2018-10-13 Thread Cameron Simpson
On 13Oct2018 14:10, Shakti Kumar wrote: I’m running a script which basically does a traceroute to the list of hosts provided, and then pulls up some info by logging in to gateways in the path. I am running this script for a list of almost 40k hosts in our data centers. Also, I am using commands

Re: socket: Too many open files

2018-10-13 Thread jfine2358
Hi Shakti You wrote: > out = commands.getstatusoutput('traceroute ' + ip) The page https://docs.python.org/3/library/subprocess.html#legacy-shell-invocation-functions describes subprocess.getstatusoutput as one of the "legacy functions from the 2.x commands module. These operations implicitly

Fwd: socket: Too many open files

2018-10-13 Thread Shakti Kumar
>Hello, >I’m running a script which basically does a traceroute to the list of hosts provided, and then pulls up some info by logging in to gateways in the path. >I am running this script for a list of almost 40k hosts in our data centers. >Also, I am using commands module to get the traceroute out

socket: Too many open files

2018-10-13 Thread Shakti Kumar
Hello, I’m running a script which basically does a traceroute to the list of hosts provided, and then pulls up some info by logging in to gateways in the path. I am running this script for a list of almost 40k hosts in our data centers. Also, I am using commands module to get the traceroute output.

Re: Too many open files

2009-02-09 Thread Ulrich Eckhardt
psaff...@googlemail.com wrote: > I'm building a pipeline involving a number of shell tools. In each > case, I create a temporary file using tempfile.mkstmp() and invoke a > command ("cmd < /tmp/tmpfile") on it using subprocess.Popen. > > At the end of each section, I call close() on the file handl

Too many open files

2009-02-09 Thread psaff...@googlemail.com
I'm building a pipeline involving a number of shell tools. In each case, I create a temporary file using tempfile.mkstmp() and invoke a command ("cmd < /tmp/tmpfile") on it using subprocess.Popen. At the end of each section, I call close() on the file handles and use os.remove() to delete them. Ev

Re: socket.error 24: too many open files

2009-01-07 Thread Bryan Olson
TheDavidFactor wrote: [...] It's a deamon that runs on a linux box and every 15 seconds it checks a MySQL table for new records, if there are any it creates a .call file on the Asterisk server using ssh, it also checks the Asterisk server, again via ssh, for any finished calls and if there are an

Re: socket.error 24: too many open files

2009-01-07 Thread Roy Smith
In article , TheDavidFactor wrote: > I have double checked that it is closing the socket. I don't know what > else to check, any suggestions would be much appreciated. All of the symptoms you report point to sockets not getting closed. What does "double checked" mean? Don't rely on __del__

socket.error 24: too many open files

2009-01-07 Thread TheDavidFactor
I'm new to python, but have been writing programs in other languages for about 15 years now. As part of my job I develop applications that interface with Asterisk in various ways. As a way of getting my feet wet I decided to try to rewrite an outbound call script that I have in another language int

Re: Too many open files

2008-02-05 Thread AMD
g the file is very time consuming. I'd rather have > the files all open for the duration, do all writes and then close them > all at the end. > The problem I have under windows is that as soon as I get to 500 files I > get the Too many open files message. I tried the same thing

Re: Too many open files

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 12:50:15 -0200, Christian Heimes <[EMAIL PROTECTED]> escribi�: > Jeff wrote: >> Why don't you start around 50 threads at a time to do the file >> writes? Threads are effective for IO. You open the source file, >> start a queue, and start sending data sets to be written to t

Re: Too many open files

2008-02-04 Thread Gary Herron
ime consuming. I'd rather have > the files all open for the duration, do all writes and then close them > all at the end. > The problem I have under windows is that as soon as I get to 500 files I > get the Too many open files message. I tried the same thing in Delphi >

Re: Too many open files

2008-02-04 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 04 Feb 2008 13:57:39 +0100, AMD wrote: > >> The problem I have under windows is that as soon as I get to 500 files I >> get the Too many open files message. I tried the same thing in Delphi >> and I can ge

Re: Too many open files

2008-02-04 Thread Larry Bates
ery time consuming. I'd rather have > the files all open for the duration, do all writes and then close them > all at the end. > The problem I have under windows is that as soon as I get to 500 files I > get the Too many open files message. I tried the same thing in Delphi >

Re: Too many open files

2008-02-04 Thread Christian Heimes
Jeff wrote: > Why don't you start around 50 threads at a time to do the file > writes? Threads are effective for IO. You open the source file, > start a queue, and start sending data sets to be written to the > queue. Your source file processing can go on while the writes are > done in other thr

Re: Too many open files

2008-02-04 Thread Steven D'Aprano
On Mon, 04 Feb 2008 13:57:39 +0100, AMD wrote: > The problem I have under windows is that as soon as I get to 500 files I > get the Too many open files message. I tried the same thing in Delphi > and I can get to 3000 files. How can I increase the number of open files > in Python? Wi

Re: Too many open files

2008-02-04 Thread Jeff
Why don't you start around 50 threads at a time to do the file writes? Threads are effective for IO. You open the source file, start a queue, and start sending data sets to be written to the queue. Your source file processing can go on while the writes are done in other threads. -- http://mail.

Too many open files

2008-02-04 Thread AMD
the files all open for the duration, do all writes and then close them all at the end. The problem I have under windows is that as soon as I get to 500 files I get the Too many open files message. I tried the same thing in Delphi and I can get to 3000 files. How can I increase the number of open