Python - 无法启动新线程

3

我在我的华硕AC68路由器上运行一个Python 2.7.10脚本。我只是在我的脚本中调用speedtest-cli.py(速度测试网站的Python脚本)。

在重启之前它一直在工作,但现在每次运行时都会出现以下错误:

    Testing download speed.......Exception in thread Thread-1:
Traceback (most recent call last):
  File "/opt/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/opt/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/jffs/scripts/LaMetric/speedtestcli.py", line 268, in producer
    thread.start()
  File "/opt/lib/python2.7/threading.py", line 745, in start
    _start_new_thread(self.__bootstrap, ())
error: can't start new thread

为了明确起见,我的华硕路由器运行了梅林版,这是所有近期华硕路由器所使用的固件的增强版本。

该代码可在此处找到:https://github.com/sivel/speedtest-cli


嗨,Nishant。代码是可以在网络上找到的speedtest-cli例程,这就是为什么我没有复制它。我编辑了帖子以反映这一点。 - Maurizio
那么一个URL怎么样? - Ulrich Eckhardt
speedtest-cli 可在此处找到:https://github.com/sivel/speedtest-cli - Maurizio
1个回答

0
一些关于ulimit的测试(感谢Google)和设置。
ulimit -s  256

问题已解决...

有人能否确认是否会有任何副作用?


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接