File handles and import -- problem

Dave Kuhlman dkuhlman at rexx.com
Tue Apr 17 15:01:42 EDT 2001


We embed the Python interpreter in our product.  Our product
creates multiple sessions, each with its own Python
(sub-)interpreter.  This works great, because each session gets its
own name space.

However, on a Solaris box that is heavily loaded (i.e. has lots of
sessions (and sub-interpreters), imports in Python scripts seem to
cause the system to run out of file handles (because every session
is running the scripts that do the imports).

I looked in the source code in Python/import.c, and Python seems to
be closing files properly.  We would not be able to be a "long
lived" application if it were not).

We increased the number of handles available to Solaris.  But, that
could only be extended so far.

Is there anything else I can do to get around this problem?

By the way, we are able to run lots of sessions (around 200 I
think), before this problem occurs.  Python really is "industrial
grade".  However, now we need to take it to the next level.

  - Dave

-- 
Dave Kuhlman
dkuhlman at rexx.com



More information about the Python-list mailing list