当报告需要长时间运行时,如何解决套接字关闭问题? [英] How can I solve socket closed when report takes long-time to run?

查看:154
本文介绍了当报告需要长时间运行时,如何解决套接字关闭问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用iReport运行Clarity中的报告。

I am running reports in Clarity made with iReport.

我的一个报告非常复杂,有时需要很长时间才能运行(取决于参数)。有时,它需要太长时间,我收到一条消息说

One of my reports is quite complex and sometimes takes a long time to run (depending on parameters). Sometimes, it takes too long and I get a message that says


Socket Closed

Socket Closed

报告快速运行时不会显示此消息。我认为这意味着运行已经超时。我目前正在努力使SQL运行得更快,但我担心它仍然不会超时。

This message does not appear when the report runs quickly. I would assume that this means that the run has timed-out. I am currently working to make the SQL run faster, but I fear it will still not be before the time-out.

有没有让插座保持打开的时间更长?

Is there anyway to make the socket stay open longer?

推荐答案

您可以在连接字符串中添加其他参数,例如

You can put additional parameters into the connection string, e.g.

jdbc:jtds:sqlserver://server:port/database;socketTimeout=120

但这只应作为最后的手段使用。也许糟​​糕的基础设施或索引太复杂但没有足够的索引是查询运行缓慢的真正原因。

This should only be used as a last resort, though. Maybe bad infrastructure or a too complex query with not enough indices is the real reason for a slow running query.

这篇关于当报告需要长时间运行时,如何解决套接字关闭问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆