parlance-zz/g-diffuser-bot

Heartbeat blocked for more than 30 seconds, error.

sneezeparty opened this issue · 2 comments

I'm no programmer, I'm just a hobbyist. Created the bot, got it on my server, and so on...

I've gotten everything installed, I run start_discord_bot.bat, the cmd line displays:

Error loading './g-diffuser-bot.json' - [Errno 2] No such file or directory: './g-diffuser-bot.json'
Starting GRPC server...
python ./server.py --enginecfg C:/Users/me/Documents/GitHub/g-diffuser-bot/g_diffuser_config_models.yaml --weight_root C:/Users/me/Documents/GitHub/g-diffuser-bot/models --vram_optimisation_level 1 (cwd=C:/Users/me/Documents/GitHub/g-diffuser-bot/extensions/stable-diffusion-grpcserver)
[2022-10-18 09:26:15] [INFO    ] discord.client: logging in using static token
[2022-10-18 09:26:16] [INFO    ] discord.gateway: Shard ID None has connected to Gateway (Session ID: 1b1e8d90b0cf935740fef4eb70bd660c).

On Discord, I /dream a prompt, and after about 30 seconds, the cmd line displays the following:

After /dream, the bot says that it's working on it.

[2022-10-18 09:30:37] [WARNING ] discord.gateway: Shard ID None heartbeat blocked for more than 30 seconds.
Loop thread traceback (most recent call last):

 File "C:\Users\me\Documents\GitHub\g-diffuser-bot\g_diffuser_bot.py", line 297, in <module>
    client.run(DISCORD_BOT_SETTINGS.token, reconnect=True)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\discord\client.py", line 828, in run
    asyncio.run(runner())
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\asyncio\base_events.py", line 633, in run_until_complete
    self.run_forever()
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\asyncio\base_events.py", line 600, in run_forever
    self._run_once()
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\asyncio\base_events.py", line 1896, in _run_once
    handle._run()
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\discord\app_commands\tree.py", line 1089, in wrapper
    await self._call(interaction)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\discord\app_commands\tree.py", line 1240, in _call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\discord\app_commands\commands.py", line 876, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\discord\app_commands\commands.py", line 851, in _do_call
    return await self._callback(interaction, **params)  # type: ignore
  File "C:\Users\me\Documents\GitHub\g-diffuser-bot\g_diffuser_bot.py", line 217, in dream
    await gdl.get_samples_async(args)
  File "C:\Users\me\Documents\GitHub\g-diffuser-bot\g_diffuser_lib.py", line 399, in get_samples_async
    async for path, artifact in grpc_samples:
  File "C:\Users\me\Documents\GitHub\g-diffuser-bot\extensions\stable-diffusion-grpcserver\client.py", line 153, in process_artifacts_from_answers_async
    async for resp in answers:
  File "C:\Users\me\Documents\GitHub\g-diffuser-bot\extensions\stable-diffusion-grpcserver\client.py", line 513, in generate_async
    for answer in answers:
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\grpc\_channel.py", line 426, in __next__
    return self._next()
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\grpc\_channel.py", line 817, in _next
    _common.wait(self._state.condition.wait, _response_ready)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\grpc\_common.py", line 141, in wait
    _wait_once(wait_fn, MAXIMUM_WAIT_TIMEOUT, spin_cb)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\site-packages\grpc\_common.py", line 106, in _wait_once
    wait_fn(timeout=timeout)
  File "C:\Users\me\anaconda3\envs\g_diffuser\lib\threading.py", line 324, in wait
    gotit = waiter.acquire(True, timeout)

Any ideas on what to do or what the problem might be?

The error about loading the bot json file is normal and expected as the bot doesn't actually save any state right now. I will remove the message because I think it looks like something is wrong.

As for the 2nd bit, does the bot ever complete the sample?
Is this the first generation after launching the bot?
Does it complete subsequent samples, or is it stuck after erroring out as above?
Lastly, is there anything to note in sdgrpcserver_err.log or sdgrpcserver.log?

Sorry for the barrage of questions.

This is now fixed.