Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Fatal Python error: Couldn't create autoTLSkey mapping" with CherryPy

I have a CherryPy webapp that used to work nicely on Ubuntu Lucid (Python 2.6.5) but now on Ubuntu Precise (Python 2.7.3) it quits on startup with the following:

Listening for SIGHUP.
Listening for SIGTERM.
Listening for SIGUSR1.
Bus STARTING
Started monitor thread '_TimeoutMonitor'.
Fatal Python error: Couldn't create autoTLSkey mapping
Aborted (core dumped)

The weird thing is that this does work on another machine with Ubuntu Precise, so I'm guessing it's a configuration issue. It looks like this has something to do with threads but I can't figure out what I'm missing.

like image 715
Joril Avatar asked Oct 06 '22 23:10

Joril


1 Answers

I've found something that looks like the culprit: I have a configuration parameter that upon booting limits the webapp memory usage with a

resource.setrlimit(resource.RLIMIT_AS, (megs * 1048576L, -1L))

If I remove the call or set "megs" to a value high enough (1100 in my tests) the error goes away.

like image 92
Joril Avatar answered Oct 10 '22 02:10

Joril