Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #13141
Closed
Open
Issue created Sep 12, 2014 by Trac@tracbot

Stem : Too many open file error

If you launch many connection over Tor using stem and launch_tor_with_config function, you'll probably have an exception like : OSError: [Errno 24] Too many open files

The problem is comming from this line: torrc_path = tempfile.mkstemp(prefix = "torrc-", text = True)[1]

This exception is raise because "tempfile.mkstemp" create a file descriptor which is never closed in process.py file.

To properly close tempile, you have to use this correction : fileDescriptor, torrc_path = tempfile.mkstemp(prefix = 'torrc-', text = True)

Before delete the temp file, you just have to close the file descriptor: os.close(fileDescriptor)

Trac:
Username: RSenet

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking