{"record":{"id":"77aae01c73d414d7","repo":"pinpoint-apm/pinpoint","slug":"timed-out-while-getting-serviceuid-servicename","errorCode":null,"errorMessage":"Timed out while getting serviceUid. serviceName:${serviceName}","messagePattern":"Timed out while getting serviceUid\\. serviceName:(.+?)","errorType":"exception","errorClass":"UidException","httpStatus":null,"severity":"error","filePath":"collector/src/main/java/com/navercorp/pinpoint/io/request/ServiceUidSuppliers.java","lineNumber":85,"sourceCode":"                return String.valueOf(future.getNow(null));\n            } catch (RuntimeException e) {\n                return \"ERROR\";\n            }\n        }\n    }\n\n    private static ServiceUid get(String serviceName, CompletableFuture<ServiceUid> future, long timeout, TimeUnit unit) {\n        try {\n            ServiceUid serviceUid = future.get(timeout, unit);\n            if (serviceUid == null) {\n                throw new UidNotFoundException(serviceName);\n            }\n            return serviceUid;\n        } catch (InterruptedException e) {\n            Thread.currentThread().interrupt();\n            throw new UidException(\"Interrupted while getting serviceUid. serviceName:\" + serviceName, e);\n        } catch (TimeoutException e) {\n            throw new UidException(\"Timed out while getting serviceUid. serviceName:\" + serviceName, e);\n        } catch (ExecutionException e) {\n            Throwable cause = e.getCause();\n            if (cause instanceof UidException uidException) {\n                throw uidException;\n            }\n            throw new UidException(\"Failed to get serviceUid. serviceName:\" + serviceName, cause);\n        }\n    }\n}\n","sourceCodeStart":67,"sourceCodeEnd":95,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/collector/src/main/java/com/navercorp/pinpoint/io/request/ServiceUidSuppliers.java#L67-L95","documentation":"ServiceUidSuppliers.get blocks on a Future supplying the serviceUid; on TimeoutException it wraps the failure in a UidException with 'Timed out while getting serviceUid. serviceName:<name>'. The serviceUid lookup (typically a cache/DB roundtrip) did not complete within the allotted time.","triggerScenarios":"get(serviceName) invoked while the underlying serviceUid async lookup exceeds the configured timeout — slow metadata storage, network latency, or an oversized request burst.","commonSituations":"Pinot/DB backing the uid cache is slow or unreachable; timeout configured too aggressively for cold-start cache misses; collector under heavy agent registration load.","solutions":["Increase the serviceUid lookup timeout in collector configuration","Check health/latency of the storage backing the uid lookup","Retry the request; warm the uid cache so lookups hit without roundtrip","Investigate thread pool exhaustion for the async lookup"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"long timeoutMs = 5000; // ensure the configured timeout covers cold cache misses","typeGuard":null,"tryCatchPattern":"try { return supplier.get(serviceName); } catch (UidException e) { if (e.getCause() instanceof TimeoutException) { return supplier.get(serviceName); } throw e; }","preventionTips":["Size the lookup timeout above worst-case storage latency","Warm the serviceUid cache after collector restart","Monitor storage latency and alert before timeouts occur"],"tags":["java","timeout","collector"],"backgroundTag":"request-timeout","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}