为什么我部署在Windows docker desktop上就能正常工作,部署在Linux服务器上,就不能正常工作?具体错误如下,始终提示什么线程收到限制,关键我查了并没有限制线程。初学者,请指教。 #47
Unanswered
yzzhangjun
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
114.230.118.177 - - [2025-12-23 07:11:31] "POST /v1/audio/speech HTTP/1.1" 500 208 0.032487
[2025-12-23 07:11:31,872] ERROR in server: Error in text_to_speech: can't start new thread
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/runners.py", line 195, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/app/tts_handler.py", line 87, in _generate_audio
await communicator.save(temp_mp3_path)
File "/usr/local/lib/python3.12/site-packages/edge_tts/communicate.py", line 603, in save
async for message in self.stream():
File "/usr/local/lib/python3.12/site-packages/edge_tts/communicate.py", line 579, in stream
async for message in self.__stream():
File "/usr/local/lib/python3.12/site-packages/edge_tts/communicate.py", line 448, in __stream
) as session, session.ws_connect(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1482, in aenter
self._resp: _RetType = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1061, in _ws_connect
resp = await self.request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 689, in request
proxy, proxy_auth = await asyncio.to_thread(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 867, in run_in_executor
executor.submit(func, *args), loop=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 180, in submit
self._adjust_thread_count()
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 203, in _adjust_thread_count
t.start()
File "/usr/local/lib/python3.12/threading.py", line 994, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/server.py", line 112, in text_to_speech
output_file_path = generate_speech(text, voice, response_format, speed)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/tts_handler.py", line 155, in generate_speech
return asyncio.run(_generate_audio(text, voice, response_format, speed))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 194, in run
with Runner(debug=debug, loop_factory=loop_factory) as runner:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/runners.py", line 62, in exit
self.close()
File "/usr/local/lib/python3.12/asyncio/runners.py", line 72, in close
loop.run_until_complete(
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 691, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 602, in shutdown_default_executor
thread.start()
File "/usr/local/lib/python3.12/threading.py", line 994, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread
114.230.118.177 - - [2025-12-23 07:11:31] "POST /v1/audio/speech HTTP/1.1" 500 208 0.035630
[root@ecs-9085-0811978 /]#
Beta Was this translation helpful? Give feedback.
All reactions