Skip to content

Commit

Permalink
Explain how to avoid 'Too many open files' OSError
Browse files Browse the repository at this point in the history
  • Loading branch information
nicocardiel committed Nov 19, 2024
1 parent 041fb20 commit 587d29d
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tutorials/tutorial_imaging/preliminary_combination.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ Preliminary combination
structure by following the instructions provided in the
:ref:`initial_file_tree` section of this documentation.

.. warning::

When combining a large number of images, and depending on the operating
system, users may get an error indicating ``OSError: [Errno 24] Too many
open files``

You can easily check the maximum number of open files allowed in your
operating system using

.. code-block:: bash
(emir) $ ulimit -Sn
This number can be easily increased employing

.. code-block:: bash
(emir) $ ulimit -n <number>
where ``<number>`` is the required number. **Note that you need this number
to be at least twice the number of images to be combined** (at some
particular steps during the image combination the pipeline requires to
access the intermediate images and the same number of mask files).

Assume you want to combine the following raw images obtained using a dithered
pattern of 7 positions iterated twice (i.e., you have gathered a total of 14
Expand Down

0 comments on commit 587d29d

Please sign in to comment.