reconnect

When PostgreSQL stops TFDConnection.Connected remains True

半腔热情 提交于 2019-12-07 19:40:08
问题 I am connecting to PostgreSQL 9.5 x64 using Delphi 10 and FireDAC. There is a reconnect feature in my software which relies on TFDConnection.Connected flag: if not _conn.Connected then if _autoConnect then _conn.Connected := True else raise Exception.Create('Not connected to database'); After I connect my software to PostgreSQL and start executing queries, I go to Windows services control panel and stop-start PostgreSQL server in order to test the reconnect feature. After starting PostgreSQL

websocket 断线重连

﹥>﹥吖頭↗ 提交于 2019-12-07 15:46:50
websocket是html5发布之后出现的一种新技术,说它是新技术,其实也不是多新的技术了,因为毕竟也有2-3年了,但是找了很多国内的实例,缺发现不多,不知道是它不好用呢,还是说这种技术原来就有缺陷呢,咱们暂且不说,今天我们就来介绍一下websocket的断线重连,,,, 这里先提供一个类库, https://github.com/joewalnes/reconnecting-websocket ,这是一个websocket重连的类库,对于处理一些简单的断线重连问题还是比较好用的,,,而且其中的功能也比较全,有兴趣的朋友可以去研究一下 接来我要介绍的是我在一个项目中遇到的问题,这是一个比较普遍的断线重连问题。。。好啦,废话不多说,我们直接看例子 首先呢 ,我们要创建一个websocket对象,其中对象的参数是我们要连接的地址,这个一般是服务端提供的。。。 var ws = new WebSocket('ws:../../websocket'); 然后我们重写一下监听收到消息的事件, ws.onmessage = function(msg){ console.log('msg:',msg); //do something }; 接下来我们重写一下监听关闭连接的事件, ws.onclose = function(){ console.log('closed....'); }; OK

How to test Intuit reconnect api?

[亡魂溺海] 提交于 2019-12-07 05:20:45
问题 I am building a page that would send a request to Intuit Reconnect API to renew the Oauth Token and Token secret values. It is working. But my test Oauth values is not within 30 days of expiration. Thus the response has always been "Token Refresh Window Out of Bounds". Is there a way around this so that I can get the success response with new token values? I would like to be able test this scenario multiple times, not just once. https://developer.intuit.com/docs/0025_quickbooksapi/0053_auth

mysql,gone away, hy000, reconnect,Mysql大sql文件导入

跟風遠走 提交于 2019-12-07 02:42:20
在导入超大sql文件到mysql的时候报错. 我遇到两个问题,1是编码,2是单条sql太大。 解决:在命令行下通过source命令导入。连接的时候,带上你相应的编码: mysql -u root -p --default-character-set=utf8 source之前,修改 max_allowed_packet : set global max_allowed_packet=1024*1024*512; 然后再source就不会报错了。 来源: oschina 链接: https://my.oschina.net/u/160743/blog/208981

Does socket.io reconnects re-run connect?

社会主义新天地 提交于 2019-12-07 01:52:11
问题 I've built a simple web application that does some communication through a node.js server using socket.io. When a user connects, node communicates back info which tells the client to subscribe to certain events. That works fine. But if you let the browser set idle, the client ends up subscribed to the events twice. The subscription process works like this: When a user connects node.js gets a 'adduser' message The two key things that hapen in that function are this: socket.on('adduser',

hibernate c3p0 broken pipe

蹲街弑〆低调 提交于 2019-12-06 12:16:25
问题 I'm using hibernate 3 with c3p0 for a program which constantly extracts data from some source and writes it to a database. Now the problem is, that the database might become unavailable for some reasons (in the simplest case: i simply shut it down). If anything is about to be written to the database there should not be any exception - the query should wait for all eternity until the database becomes available again. If I'm not mistaken this is one of the things the connection pool could do

When PostgreSQL stops TFDConnection.Connected remains True

我只是一个虾纸丫 提交于 2019-12-06 01:59:40
I am connecting to PostgreSQL 9.5 x64 using Delphi 10 and FireDAC. There is a reconnect feature in my software which relies on TFDConnection.Connected flag: if not _conn.Connected then if _autoConnect then _conn.Connected := True else raise Exception.Create('Not connected to database'); After I connect my software to PostgreSQL and start executing queries, I go to Windows services control panel and stop-start PostgreSQL server in order to test the reconnect feature. After starting PostgreSQL server I continue to get following errors: [FireDAC][Phys][PG][libpq] no connection to the server and

How to test Intuit reconnect api?

不羁的心 提交于 2019-12-05 09:36:52
I am building a page that would send a request to Intuit Reconnect API to renew the Oauth Token and Token secret values. It is working. But my test Oauth values is not within 30 days of expiration. Thus the response has always been "Token Refresh Window Out of Bounds". Is there a way around this so that I can get the success response with new token values? I would like to be able test this scenario multiple times, not just once. https://developer.intuit.com/docs/0025_quickbooksapi/0053_auth_auth/0020_reconnect_api Thanks. Peter Lavelle The playground will allow you to specify the token

Does socket.io reconnects re-run connect?

北战南征 提交于 2019-12-05 07:47:14
I've built a simple web application that does some communication through a node.js server using socket.io. When a user connects, node communicates back info which tells the client to subscribe to certain events. That works fine. But if you let the browser set idle, the client ends up subscribed to the events twice. The subscription process works like this: When a user connects node.js gets a 'adduser' message The two key things that hapen in that function are this: socket.on('adduser', function(data) <snip> socket.emit('nodeinfo', {node_id: NODE_ID}); socket.emit('update', {msg: 'you are

hibernate c3p0 broken pipe

余生颓废 提交于 2019-12-04 20:30:28
I'm using hibernate 3 with c3p0 for a program which constantly extracts data from some source and writes it to a database. Now the problem is, that the database might become unavailable for some reasons (in the simplest case: i simply shut it down). If anything is about to be written to the database there should not be any exception - the query should wait for all eternity until the database becomes available again. If I'm not mistaken this is one of the things the connection pool could do for me: if there is a problem with the db, just retry to connect - in the worst case for infinity. But