【问题标题】:Python - Can't start a new threadPython - 无法启动新线程
【发布时间】:2016-01-23 22:22:38
【问题描述】:

我在华硕 AC68 机器中运行 python 2.7.10 脚本。我只是从我的脚本中调用 speedtest-cli.py(speedtest.net py 脚本)。

在我重新启动它之前它可以工作,现在每次运行它都会出现这个错误:

    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

需要说明的是,我的华硕运行 Merlin,这是 Asuswrt 的增强版本 - 所有最近的华硕路由器都使用的固件。

代码可以在这里找到:https://github.com/sivel/speedtest-cli

【问题讨论】:

  • 您好,Nishant。代码是网上可以找到的speedtest-cli例程,所以我没有复制。我编辑了帖子以反映这一点。
  • 那么 URL 怎么样?
  • speedtest-cli 可以在这里找到:github.com/sivel/speedtest-cli

标签: python python-2.7


【解决方案1】:

关于 ulimit 的一些测试(感谢 Google)和设置

ulimit -s  256

解决了...

任何人都可以确认可能有任何副作用吗?

【讨论】:

    猜你喜欢
    • 2021-01-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多