Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when scan the timeout invocation of remoting. #797

Closed
yxxstar opened this issue Nov 1, 2017 · 2 comments
Closed

Exception when scan the timeout invocation of remoting. #797

yxxstar opened this issue Nov 1, 2017 · 2 comments
Labels
status/waiting-for-feedback Need reporters to triage

Comments

@yxxstar
Copy link

yxxstar commented Nov 1, 2017

当dubbo超时请求,一直会刷那个日志不停。。报空指针异常
private static class RemotingInvocationTimeoutScan implements Runnable {

    public void run() {
        while (true) {
            try {
                for (DefaultFuture future : FUTURES.values()) {
                    if (future == null || future.isDone()) {
                        continue;
                    }
                    if (System.currentTimeMillis() - future.getStartTimestamp() > future.getTimeout()) {
                        // create exception response.
                        Response timeoutResponse = new Response(future.getId());
                        // set timeout status.
                        timeoutResponse.setStatus(future.isSent() ? Response.SERVER_TIMEOUT : Response.CLIENT_TIMEOUT);
                        timeoutResponse.setErrorMessage(future.getTimeoutMessage(true));
                        // handle response.
                        DefaultFuture.received(future.getChannel(), timeoutResponse);
                    }
                }
                Thread.sleep(30);
            } catch (Throwable e) {
                logger.error("Exception when scan the timeout invocation of remoting.", e);
            }
        }
    }
}
@chickenlj
Copy link
Contributor

详细异常堆栈能贴一下吗

@chickenlj
Copy link
Contributor

用的什么版本的dubbo?如果你这找到了详细的堆栈,可以再打开issue
#459 参考下和这个issue有没有关联

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-feedback Need reporters to triage
Projects
None yet
Development

No branches or pull requests

2 participants