nurpax / nurpawiki

Automatically exported from code.google.com/p/nurpawiki
GNU General Public License v2.0
0 stars 3 forks source link

Nurpawiki does not handle restart of Postgresql as it loses DB connection #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start Ocsigen+Nurpawiki
2. Login
3. Restart postgresql
4. Navigate to main page of Nurpawiki

What is the expected output? What do you see instead?

Expected output is to see the main page.

Instead, I see Nurpawiki suggesting for a DB upgrade.  After editing the
URL to point to main page, I get Error 500.

Apparently DB connection is lost on server restart.  The DB code in
Nurpawiki needs to somehow deal with this.

Original issue reported on code.google.com by jjhel...@gmail.com on 10 Dec 2007 at 12:13

GoogleCodeExporter commented 9 years ago
From psql docs 
(http://www.postgresql.org/docs/7.4/interactive/libpq-status.html):

     Returns the status of the connection.

    ConnStatusType PQstatus(const PGconn *conn);

    The status can be one of a number of values. However, only two of these are seen
outside of an asynchronous connection procedure: CONNECTION_OK and 
CONNECTION_BAD. A
good connection to the database has the status CONNECTION_OK. A failed 
connection
attempt is signaled by status CONNECTION_BAD. Ordinarily, an OK status will 
remain so
until PQfinish, but a communications failure might result in the status 
changing to
CONNECTION_BAD prematurely. In that case the application could try to recover by
calling PQreset.

    See the entry for PQconnectStart and PQconnectPoll with regards to other status
codes that might be seen. 

Original comment by jjhel...@gmail.com on 10 Dec 2007 at 2:11

GoogleCodeExporter commented 9 years ago

Original comment by jjhel...@gmail.com on 13 Dec 2007 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by jjhel...@gmail.com on 16 Dec 2007 at 7:03

GoogleCodeExporter commented 9 years ago
Changes in r322 and r324 should make this problem go mostly away.

Original comment by jjhel...@gmail.com on 1 Jan 2008 at 10:18