No response on backend (postgresql) crash #135

Closed
strk opened this Issue Feb 26, 2014 · 5 comments

1 participant

@strk

I've seen an instance of Windshaft-CartoDB waiting for 10 minutes without luck for an answer from a request while the CartoDB-SQL-API logs reported a backend crash and no long taking response.

I guess there's a bug preventing a response from being completed, but has to be checked.

JIRA REF: https://cartodb.atlassian.net/browse/CDB-1883

@strk strk added this to the 1.8.4 milestone Feb 26, 2014
@strk strk added bug JIRA labels Feb 26, 2014
@strk

I cound easily reproduce with this:

tools/cdbsql 'select count(*) from (select generate_series(1,40000000)) f' &
pg_ctl -m immediate stop

The request never gets a response.

@strk

Possible reason for this: brianc/node-postgres#534

@strk strk added a commit to strk/node-postgres that referenced this issue Mar 14, 2014
@strk strk Remove client from pool on connection end
Might fix #458
Definitely fixes CartoDB/CartoDB-SQL-API#135
fb491cf
@strk strk referenced this issue in brianc/node-postgres Mar 14, 2014
Closed

Remove client from pool on connection end #537

@strk

This patch seems to fix the problem with the hang:
brianc/node-postgres#537

@strk

Second attempt of a fix: brianc/node-postgres#542

@strk

Alright the second pull only partially fixes the issue. it fixes the error from first query, but does not remove the connection from the pool which as a consequence remains sticky.
The first pool is trying to deal with that.

@strk strk added a commit to CartoDB/node-postgres that referenced this issue Mar 17, 2014
@strk strk Remove disconnected clients from the pool 9c5cd8d
@strk strk referenced this issue in brianc/node-postgres Mar 17, 2014
Merged

Remove disconnected clients from the pool #543

@strk strk added a commit to CartoDB/node-postgres that referenced this issue Mar 18, 2014
@strk strk Remove disconnected clients from the pool
Might fix #458
Fixes CartoDB/CartoDB-SQL-API#135
Avoids loop between pool.destroy and client.end
7e2e87d
@strk strk added a commit to CartoDB/node-postgres that referenced this issue Mar 18, 2014
@strk strk Remove disconnected clients from the pool
Might fix #458
Fixes CartoDB/CartoDB-SQL-API#135
Avoids loop between pool.destroy and client.end
edba02c
@strk strk added a commit that closed this issue Mar 19, 2014
@strk strk Fix lack of response on backend crash
Closes #135
Enables previously failing test
Required upgrade of node-postgresql to own fork
f88d33f
@strk strk closed this in f88d33f Mar 19, 2014
@strk strk modified the milestone: 1.9.0, 1.8.4 Mar 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment