# Aiida Daemon timing out

**URL:** <https://aiida.discourse.group/t/aiida-daemon-timing-out/522>\
**Category:** New to AiiDA\
**Tags:** question\
**Created:** [January 13, 2025, 11:07am UTC](https://aiida.discourse.group/t/aiida-daemon-timing-out/522 "2025-01-13T11:07:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoeezebra](https://avatars.discourse-cdn.com/v4/letter/z/ce7236/32.png) [@zoeezebra](https://aiida.discourse.group/u/zoeezebra)\
**Post date:** [January 13, 2025, 11:07am UTC](https://aiida.discourse.group/t/aiida-daemon-timing-out/522/1 "2025-01-13T11:07:53Z")

</div>

Hello,

I am using Aiida to run some quantum espresso calculations.  
Today I am running into an issue with the Aiida daemon which seems to be unresponsive. I had not encountered these issues previously with the same type of calculations.

I have tried to restart the daemon with `verdi daemon restart` and with `verdi daemon stop`, `verdi daemon start`. In all of these attempts I always get the error `Critical: Connection to the daemon timed out.` I get the same error when trying `verdi daemon status`.  
Everything else seems to be running correctly :  
`  
✔ version: AiiDA v2.6.3  
✔ config: /home/zoe/.aiida  
✔ profile: presto-1  
✔ storage: SqliteDosStorage[/home/zoe/.aiida/repository/sqlite\_dos\_3ca4aad38b0746e49b75a8466de4efb5]: open,  
✔ broker: RabbitMQ v3.12.1 @ amqp://guest:guest@127.0.0.1:5672?heartbeat=600  
✘ daemon: Connection to the daemon timed out.

`

I have looked into the log file for the Aiida daemon and found the following error :

`Task exception was never retrieved future: <Task finished name='Task-894' coro=<ensure_future.<locals>._wrap_awaitable() done, defined at /home/zoe/anaconda3/lib/python3.12/asyncio/tasks.py:683> exception=RuntimeError('Writer is None')> Traceback (most recent call last): File "/home/zoe/anaconda3/lib/python3.12/asyncio/tasks.py", line 314, in __step_run_and_handle_result result = coro.send(None) ^^^^^^^^^^^^^^^ File "/home/zoe/anaconda3/lib/python3.12/asyncio/tasks.py", line 684, in _wrap_awaitable return await awaitable ^^^^^^^^^^^^^^^ File "/home/zoe/anaconda3/lib/python3.12/site-packages/aiormq/tools.py", line 86, in__await__return (yield from self().__await__()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zoe/anaconda3/lib/python3.12/site-packages/aiormq/connection.py", line 138, in drain raise RuntimeError("Writer is %r" % self.writer) RuntimeError: Writer is None`  
What should I do to try to resolve this error with the daemon?

Many thanks for your help,

---

<div class="post-metadata">

**Author:** ![bastonero](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/bastonero/32/32_2.png) [@bastonero](https://aiida.discourse.group/u/bastonero)\
**Post date:** [January 14, 2025, 6:07pm UTC](https://aiida.discourse.group/t/aiida-daemon-timing-out/522/2 "2025-01-14T18:07:49Z")

</div>

Hi, I’ll give you my two cents on what I would do in this case. My understanding is that `circus`, which is the process running indefinitely the daemon, somehow gets stuck. So, what I do in this case is to look in the `$AIIDA_PATH/daemon/log/circus-*.log` and look for the associated PID. In my case it looks like the following:

```auto
2025-01-09 09:59:04 circus[2253051] [INFO] aiida-bastonero stopped
2025-01-09 09:59:04 circus[2253051] [INFO] aiida-bastonero started
2025-01-09 10:17:02 circus[604419] [INFO] Starting master on pid 604419
2025-01-09 10:17:02 circus[604419] [INFO] Arbiter now waiting for commands
2025-01-09 10:17:02 circus[604419] [INFO] aiida-bastonero started
2025-01-09 10:17:02 circus[604419] [INFO] circusd-stats started
2025-01-09 10:17:03 circus[604428] [INFO] Starting the stats streamer

```

In my case, I would simply do in the terminal `kill -9 604419`. You can even find it by using `ps -ef | grep circus`, but it is better to double check in the log file. At this point, you can do `verdi daemon start`, and aiida will remove the stale daemon and start smoothly again.

Overall this procedure is close to switching off your computer without having stopped the daemon. This is in general safe, as aiida is designed to be robust in this scenario.

---

<div class="post-metadata">

**Author:** ![zoeezebra](https://avatars.discourse-cdn.com/v4/letter/z/ce7236/32.png) [@zoeezebra](https://aiida.discourse.group/u/zoeezebra)\
**Post date:** [January 17, 2025, 8:53pm UTC](https://aiida.discourse.group/t/aiida-daemon-timing-out/522/3 "2025-01-17T20:53:04Z")

</div>

Thanks for the suggestion, I tried this and it solved my issues
