{"record":{"id":"20daa7ba9d04b43d","repo":"rustdesk/rustdesk","slug":"key-overuse","errorCode":null,"errorMessage":"Key overuse","messagePattern":"Key overuse","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/client.rs","lineNumber":958,"sourceCode":"                };\n                match msg_in.union {\n                    Some(rendezvous_message::Union::PunchHoleResponse(ph)) => {\n                        if ph.socket_addr.is_empty() {\n                            if !ph.other_failure.is_empty() {\n                                bail!(ph.other_failure);\n                            }\n                            match ph.failure.enum_value() {\n                                Ok(punch_hole_response::Failure::ID_NOT_EXIST) => {\n                                    bail!(\"ID does not exist\");\n                                }\n                                Ok(punch_hole_response::Failure::OFFLINE) => {\n                                    bail!(\"Remote desktop is offline\");\n                                }\n                                Ok(punch_hole_response::Failure::LICENSE_MISMATCH) => {\n                                    bail!(\"Key mismatch\");\n                                }\n                                Ok(punch_hole_response::Failure::LICENSE_OVERUSE) => {\n                                    bail!(\"Key overuse\");\n                                }\n                                _ => bail!(\"other punch hole failure\"),\n                            }\n                        } else {\n                            peer_nat_type = ph.nat_type();\n                            is_local = ph.is_local();\n                            signed_id_pk = ph.pk.into();\n                            relay_server = ph.relay_server;\n                            peer_addr = AddrMangle::decode(&ph.socket_addr);\n                            feedback = ph.feedback;\n                            webrtc_sdp_answer = ph.webrtc_sdp_answer;\n                            let s = udp.0.take();\n                            if udp_nat_port > 0 && ph.is_udp && s.is_some() {\n                                if let Some(s) = s {\n                                    allow_err!(s.connect(peer_addr).await);\n                                    udp.0 = Some(s);\n                                }\n                            }","sourceCodeStart":940,"sourceCodeEnd":976,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540/src/client.rs#L940-L976","documentation":"The rendezvous server returned Failure::LICENSE_OVERUSE in the PunchHoleResponse: the pro server's licensed connection/device limit has been reached, so new punch-hole requests are refused. The client bails with 'Key overuse'.","triggerScenarios":"PunchHoleResponse with empty socket_addr and ph.failure == LICENSE_OVERUSE, raised when concurrent devices/connections exceed the server license quota.","commonSituations":"Self-hosted pro deployment exceeding its licensed device count; stale device entries consuming license seats after fleet changes; demo/free license used in production load.","solutions":["Upgrade or extend the server license to cover current usage","Remove inactive/decommissioned devices from the server's licensed device list","Stagger or reduce concurrent connections, then retry"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Check current licensed device/connection count against the license quota via the server admin console before connecting","typeGuard":null,"tryCatchPattern":"match connect() {\n    Err(e) if e.to_string() == \"Key overuse\" => {\n        alert_admin(\"License quota exceeded; upgrade or free devices\");\n        retry_after_quota_frees();\n    }\n    r => handle(r),\n}","preventionTips":["Provision a license headroom above peak concurrent usage","Clean up decommissioned devices from the licensed device list","Alert on license utilization trends before hitting the cap"],"tags":["network","license","quota","rust"],"backgroundTag":"rate-limit-exceeded","analyzedSha":"91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540","analyzedAt":"2026-09-10T19:53:44.083Z","contentChangedAt":"2026-09-10T19:53:44.083Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}