本文介绍了Rubyrep和Postgres-> PG :: ERROR:尝试扫描时连接已关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用服务器信息设置rubyrep配置文件。没有额外的选择。我测试了是否可以使用PGAdmin从外部连接到两个数据库。

I setup the rubyrep config file with the server information. No extra options. I tested if i could connect to both databases externally with PGAdmin.

当我尝试一下时,我看到监视图中的连接峰值,所以它确实进入了扫描初始表。我认为*它也连接到第二张表,但沿线的某个地方坏了。我得到的错误是

When I try it out I see the connection spike on my monitoring graphs, so it does go in there and scan the initial table. I think* it connects to the 2nd table as well, but somewhere along the line it breaks. The error that I get is

Exception caught: PG::Error: connection is closed: show search_path

我在两个数据库上都有相同的架构。我的rubyrep版本是1.20,我的pg版本是0.14,我尝试了0.11和0.12,因为我在某些问题中看到它解决了某些问题的连接问题,但仍然有问题。我不确定还有什么可以尝试的。

I have identical schema on both databases. My rubyrep version is 1.20, my pg version is 0.14, and I tried 0.11 and 0.12 as I saw in some question it fixed connection problems for some but I still have the problem. I am not sure what else is there left to try.

添加更多信息

当我尝试2个本地数据库时-没问题。因此,我的设置似乎没有问题。当我将地址更改为外部数据库时,又想从上述问题中复制该地址。

When I tried 2 local databases - there was no problem. So it doesn't seem to be a problem with my setup. When I changed the address to the external database as the one I want to copy from the above problem happened again.

在测试时,我看到了看起来像相应的负载峰值,但是没有返回任何数据。我对服务器的访问权限有限,因此无法检查服务器日志中是否发生了某些问题,这些问题实际上导致ruby rep给我该错误。

When I was testing this I saw what looked like corresponding load spikes, however no data was returned. I have limited access to the server so cannot check if there is some problem that happens in server logs that actually causes ruby rep to give me that error.

推荐答案

我找到了答案。只需使用此存储库!

I found answer. Just use this repository https://github.com/ncoders/rubyrep !

这篇关于Rubyrep和Postgres-> PG :: ERROR:尝试扫描时连接已关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 02:28