The room is automatically closing if the participa...
# agents
p
The room is automatically closing if the participant is speaking non stop for about 5 minutes. Can someone help me understanding what's happening here? Is the room closing first or the agent shutting down?
Livekit Logs:
Copy code
2025-08-05T21:03:28.718Z        WARN    livekit.transport       rtc/transportmanager.go:330     send data message error {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "EG_85EJvWCm7w7G", "pID": "PA_7qgACuxQ3wNv", "remote": false, "error": "data channel is not available"}
2025-08-05T21:03:28.718Z        WARN    livekit.transport       rtc/transportmanager.go:330     send data message error {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "EG_85EJvWCm7w7G", "pID": "PA_7qgACuxQ3wNv", "remote": false, "error": "data channel is not available"}
2025-08-05T21:03:28.719Z        WARN    livekit.transport       rtc/transportmanager.go:330     send data message error {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "EG_85EJvWCm7w7G", "pID": "PA_7qgACuxQ3wNv", "remote": false, "error": "data channel is not available"}
2025-08-05T21:03:28.720Z        WARN    livekit.transport       rtc/transportmanager.go:330     send data message error {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "EG_85EJvWCm7w7G", "pID": "PA_7qgACuxQ3wNv", "remote": false, "error": "data channel is not available"}
2025-08-05T21:03:28.736Z        INFO    livekit rtc/room.go:499 participant active      {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "EG_85EJvWCm7w7G", "pID": "PA_7qgACuxQ3wNv", "remote": false, "subscriberCandidates": ["[local][selected:1][trickle] udp4 host 172.178.60.75:7882 (resolved: 172.178.60.75:7882)", "[local][trickle] tcp4 host 172.178.60.75:7881 (resolved: 172.178.60.75:7881)", "[remote][filtered][trickle] udp4 host :40669", "[remote][trickle] udp4 srflx 20.232.188...:40669  related 0.0.0.0:0", "[remote][selected:1] udp4 prflx 20.232.188...:40669"], "connectionType": "udp", "clientInfo": {"sdk": "JS", "version": "2.8.0", "protocol": 15, "os": "Linux", "deviceModel": "Other", "browser": "Chrome", "browserVersion": "125.0.0"}}
2025-08-05T21:08:21.257Z        INFO    livekit.room    rtc/room.go:957 closing room    {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h"}
2025-08-05T21:08:21.257Z        INFO    livekit rtc/participant.go:1244 participant closing     {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "EG_85EJvWCm7w7G", "pID": "PA_7qgACuxQ3wNv", "remote": false, "sendLeave": true, "reason": "ROOM_CLOSED", "isExpectedToResume": false}
2025-08-05T21:08:21.263Z        INFO    livekit rtc/participant.go:1244 participant closing     {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "user_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "pID": "PA_axJRTQuxZdgf", "remote": false, "sendLeave": true, "reason": "ROOM_CLOSED", "isExpectedToResume": false}
2025-08-05T21:08:21.265Z        INFO    livekit rtc/participant.go:1244 participant closing     {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "participant": "agent-AJ_gaD3mvUP4YJp", "pID": "PA_tps7tAqhbKja", "remote": false, "sendLeave": true, "reason": "ROOM_CLOSED", "isExpectedToResume": false}
2025-08-05T21:08:21.268Z        INFO    livekit service/roommanager.go:177      deleting room state     {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167"}
2025-08-05T21:08:21.270Z        INFO    livekit.room    service/roommanager.go:627      room closed     {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h"}
2025-08-05T21:08:21.270Z        INFO    livekit.room    rtc/room.go:941 closing idle room       {"room": "room_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "roomID": "RM_cfvRiQfREB5h", "reason": "empty timeout"}
2025-08-05T21:08:21.280Z        INFO    livekit.agents  agent/worker.go:515     job ended       {"workerID": "AW_Em7G4LBnuUgB", "agentName": "audio-agent", "jobType": "JT_ROOM", "jobID": "AJ_gaD3mvUP4YJp", "status": "JS_FAILED", "error": "agent worker left the room"}
Agent logs:
Copy code
ngine:453:livekit::rtc_engine - received session close: "signal client closed: \"stream closed\"" UnknownReason Resume
DEBUG:livekit.agents:shutting down job task
2025-08-05 16:08:20,668 - DEBUG livekit.agents - shutting down job task {"reason": "room disconnected", "user_initiated": false}
DEBUG:livekit.agents:job exiting
2025-08-05 16:08:20,686 - DEBUG livekit.agents - job exiting {"reason": "room disconnected", "tid": 45752, "job_id": "AJ_gaD3mvUP4YJp"}
DEBUG:livekit.agents:input stream detached
2025-08-05 16:08:20,689 - DEBUG livekit.agents - input stream detached {"participant": "user_1483912-25093ef3-666b-4d64-8909-99ccfaac3167", "source": "SOURCE_UNKNOWN", "accepted_sources": ["SOURCE_MICROPHONE"]}
DEBUG:livekit.agents:session closed
2025-08-05 16:08:21,151 - DEBUG livekit.agents - session closed {"reason": "job_shutdown", "error": null}
DEBUG:livekit.agents:http_session(): closing the httpclient ctx
2025-08-05 16:08:21,152 - DEBUG livekit.agents - http_session(): closing the httpclient ctx
Timestamps suggest the
received session close: "signal client closed: \"stream closed\"" UnknownReason Resume
is happening first. Before the
closing room
log
The ~5 minute seems to correspond with the
empty_timeout: 300
but not sure if that's the cause. Since I am sure one participant is in the room.
Edit: I tested for over 7 minutes after setting empty_timeout to 1800. and it seems to resolve my issue. I'll keep testing