We have deployed postgres XL cluster setup. From the application server, we are creating the DBConnection pool and we recreate connection pool for every 5 minutes. When I am trying to reconnect to the Postgres XL once in a while PGAPI_DriverConnect call getting hung and process moved to deadlock state. Any suggestions on how to tackle this scenario.
code snippet:
db_connection_str= DRIVER=PostgreSQL_unixODBC;DATABASE=mpsdb;SERVER=10.102
.31.167;PORT=11921;UID=pgroot;PWD=;
Poco::Data::ODBC::Connector::registerConnector();
session = new Session(Poco::Data::ODBC::Connector::KEY, db_connection_str);
/* This changed is required for a POCO ODBC issue - Please refer to http://stackoverflow.com/questions/27303972/poco-1-5-2-c-odbc-throws-exceptions-on-insert */
std::size_t fieldSize = 1048576;
session->setProperty("maxFieldSize", Poco::Any(fieldSize));
connected = true;
Backtrace of process:
==============
0 0x00000008068d361c in poll () from /lib/libc.so.7
1 0x00000008062f192e in poll () from /lib/libthr.so.3
2 0x0000000808245c46 in SOCK_clear_error () from /lib/psqlodbcw.so
3 0x00000008082460eb in SOCK_get_next_byte () from /lib/psqlodbcw.so
4 0x0000000808246497 in SOCK_get_id () from /lib/psqlodbcw.so
5 0x0000000808222669 in CC_begin () from /lib/psqlodbcw.so
6 0x0000000808223924 in CC_connect () from /lib/psqlodbcw.so
7 0x000000080822ff12 in PGAPI_DriverConnect () from /lib/psqlodbcw.so
8 0x0000000808258f5b in SQLDriverConnect () from /lib/psqlodbcw.so
9 0x0000000803027200 in SQLDriverConnect () from /lib/libodbc.so.1
10 0x0000000802d8d8fc in Poco::Data::ODBC::SessionImpl::open () from /lib/libPocoDataODBC.so.16
11 0x0000000802d8eca6 in Poco::Data::ODBC::SessionImpl::SessionImpl () from /lib/libPocoDataODBC.so.16
12 0x0000000802d79130 in Poco::Data::ODBC::Connector::createSession () from /lib/libPocoDataODBC.so.16
13 0x0000000802c3df71 in Poco::Data::SessionFactory::create () from /lib/libPocoData.so.16
14 0x0000000802c3c48f in Poco::Data::Session::Session () from /lib/libPocoData.so.16
15 0x0000000804b2c067 in POCOConnection::connect () from ./lib/libmps_framework.so
16 0x0000000804b31e4e in DBConnectionPool::resetPOCOConnection () from ./lib/libmps_