You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Trying to establish connection with remote PG server got error "Warning: cannot connect to the postgresql server X.X.X.X: could not send SSL negotiation packet: Resource temporarily unavailable". Same result for "li run main.cc" and local CMake build. pgcli works fine with the same connection parameters.
auto db = pgsql_database(
s::host = "xxx.xxx.xxx.xxx", // Hostname or ip of the database server
s::database = "my-services", // Database name
s::user = "admin", // Username
s::password = "admin", // Password
s::port = 31357, // Port
s::charset = "utf8", // Charset
// Only for async connection, specify the maximum number of SQL connections per thread.
s::max_async_connections_per_thread = 200,
// Only for synchronous connection, specify the maximum number of SQL connections
s::max_sync_connections = 2000);
auto countries_orm = sql_orm_schema(db, "sys.country")
.fields(
s::id(s::auto_increment, s::primary_key) = int(),
s::code = std::string(),
s::code_3 = std::string(),
s::code_dig = std::string(),
s::name = std::string(),
s::name_engl = std::string(),
s::note = std::string()
);
auto countries = countries_orm.connect();
The text was updated successfully, but these errors were encountered:
Fought this for a while and still don't have a great answer. The error is from the libpq library however. If you put a delay in the pgstatus check loop, it works. Without the delay it has a packet issue whether ssl is involved or not.
Edit - This appears to be an issue if you immediately try to connect after an app starts. Start the app with a sleep and all connections work well. This is libpq as far as I can tell.
Hi! Trying to establish connection with remote PG server got error "Warning: cannot connect to the postgresql server X.X.X.X: could not send SSL negotiation packet: Resource temporarily unavailable". Same result for "li run main.cc" and local CMake build. pgcli works fine with the same connection parameters.
The text was updated successfully, but these errors were encountered: