且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

错误:由于用户请求而取消查询

更新时间:2023-01-12 20:01:14



于07/09/2004 12:33 Tore Halset写道:

On 07/09/2004 12:33 Tore Halset wrote:
你好。

我正在尝试将旧的Java应用程序从MS SQL Server移植到在Mac OS X上运行的PostgreSQL。我可以访问java源代码并且可以进行修改。我试过PostgreSQL版本7.4.2和
8.0.0beta2,但得到了同样的错误。我使用的是pgdev.305.jdbc3.jar,用于8.0.0beta2。 PostgreSQL安装是标准的,除了
log_statement =''all''来调试这个问题。

问题是服务器返回ERROR:由于
用户请求关于一些问题。我没有发现任何(其他)小超时的迹象,或者可以在java客户端中取消查询。我已经尝试过来自psql promt的查询,而且它们都非常快。
我应该从哪里开始寻找?是否有比应该打开的
log_statement更多的调试标志?
Hello.

I am trying to port an old java application from MS SQL Server to
PostgreSQL running on Mac OS X. I have access to the java source code and
can make modifications. I have tried with PostgreSQL version 7.4.2 and
8.0.0beta2, but get the same error. I am using pgdev.305.jdbc3.jar for
8.0.0beta2. The PostgreSQL installation are standard, except for
log_statement = ''all'' to debug this problem.

The problem is that the server returns "ERROR: canceling query due to
user request" on some of the queries. I do not find any (other) signs of
small timeouts or that the query could be cancelled in the java client. I
have tried the queries from the psql promt, and they are all pretty fast.
Where should I start looking? Are there any more debug flags than
log_statement that should be turned on?



听起来我的Java应用程序正在发出取消。
>
-

Paul Thomas

+ ------------------------ ------ + ------------------------------------------- +

| Thomas Micro Systems Limited |商业软件解决方案|

|电脑顾问| http://www.thomas-micro-systems-ltd.co。英国 |

+ ------------------------------ + ---- --------------------------------------- +


---------------------------(广播结束)---------------- -----------

提示7:别忘了增加免费空间地图设置


It sounds to my like your Java app is issueing the cancel.

--
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business |
| Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+

---------------------------(end of broadcast)---------------------------
TIP 7: don''t forget to increase your free space map settings





我们在旧的低规格服务器上遇到了这个问题,我们知道这些服务器存在内存问题。

错误消息仅发生在较大的作业上,例如恢复大桌子。


IIRC,去年我在搞乱postgres之后遇到了同样的问题配置参数,

可能也是内存问题,因为当我将参数重置为更合理的

设置时它就消失了。


服务器日志可能包含一些信息。


我希望这能为您提供一些线索,让您了解从哪里开始寻找您的问题。

问候

Mr Pink


--- Tore Halset< ha **** @ pvv.ntnu.no>写道:
Hi,

We were getting that problem on an old, low spec server that we know has memory problems. The
error message occured only on larger jobs, such as restoring a large table.

IIRC, I got the same problem last year after messing around with postgres config parameters,
probably also a memory issue since it went away when I reset my parameters to more reasonable
settings.

The server log may have some information.

I hope this gives you some clue as to where to start looking for your problem.
regards
Mr Pink

--- Tore Halset <ha****@pvv.ntnu.no> wrote:
您好。

我正在尝试将旧的Java应用程序从MS SQL Server移植到在Mac OS X上运行的PostgreSQL。我有权访问java源代码
并可以进行修改。我试过PostgreSQL版本7.4.2
和8.0.0beta2,但得到了同样的错误。我正在使用pgdev.305.jdbc3.jar
for 8.0.0beta2。 PostgreSQL安装是标准的,除了
log_statement =''all''来调试这个问题。

问题是服务器返回ERROR:由于
用户请求关于一些问题。我没有找到任何(其他)标志的小超时或者可以在java
客户端中取消查询。我已经尝试过来自psql promt的查询,而且它们都非常快。我该在哪里开始寻找?是否还有比应该打开的log_statement更多的调试
标志?

问候,
- Tore。

------- --------------------(广播结束)------------------------- - 提示5:您是否检查了我们广泛的常见问题解答?

http://www.postgresql.org/docs/faqs/FAQ.html




__________________________________

你是雅虎!?

Y! Messenger - 实时沟通。立即下载。
http://messenger.yahoo.com


---------------------------(广播结束)---------- -----------------

提示6:您是否搜索了我们的列表档案?

http://archives.postgresql.org




__________________________________
Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
http://messenger.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


Tore Halset< ha **** @ pvv.ntnu.no>写道:
Tore Halset <ha****@pvv.ntnu.no> writes:
我正在尝试将旧的Java应用程序从MS SQL Server移植到在Mac OS X上运行的PostgreSQL。
...
问题在于服务器返回ERROR:由于用户请求而取消查询关于一些查询。
I am trying to port an old java application from MS SQL Server to
PostgreSQL running on Mac OS X.
...
The problem is that the server returns "ERROR: canceling query due to
user request" on some of the queries.




这个的最直接原因必须是向后端进程发送SIGINT

''运行查询。你必须看看

周围的原因,如果你确定你的客户

代码没有做到这一点。有几种可能性浮现在脑海中:


1.你在终端窗口上不小心输入了^ C,postmaster是从b
发起的。


2. postmaster是在非无限资源限制下启动的。
(ulimit设置)以及在OS X上通过发送执行的任何强制执行

SIGINT而不是更标准的信号。

SIGINTs是否在可预测的时间到来,例如当后端有多少
累计X运行时间?


这不是这是我第一次听说在OS X上发出意外的SIGINTs

。(我依稀回忆起看到MySQL人抱怨

就是这样。)我没有看到它发生在我自己的测试中,但是,

所以我不确定发生了什么。如果你找到了原因,请告诉我们。


问候,汤姆巷


------------- --------------(广播结束)---------------------------

提示5:您是否检查了我们广泛的常见问题解答?

http://www.postgresql.org/docs/faqs/FAQ.html



The proximate cause of this has to be that something is sending SIGINT
to the backend process that''s running the query. You''ll have to look
around for reasons for that to happen, if you''re sure that your client
code isn''t doing it. A couple of possibilities come to mind:

1. You accidentally typed ^C on the terminal window the postmaster was
launched from.

2. The postmaster was launched under non-infinite resource limits
(ulimit settings) and whatever enforces that on OS X does it by sending
SIGINT rather than the more standard signals for such things. Do the
SIGINTs come at predictable times, such as when the backend has
accumulated X amount of runtime?

This isn''t the first time I''ve heard of unexpected SIGINTs being
delivered on OS X. (I vaguely recall seeing the MySQL guys complaining
of just that.) I have not seen it happen in my own testing, though,
so I''m not sure what''s going on. Let us know if you find the cause.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html