MySQL Forums
Forum List  »  Connector/C++

Re: Connection Timeout on remote DB connection
Posted by: Luis Silva
Date: December 02, 2019 05:08PM

You can also play with connection timeout...

mysqlx::Session sess(SessionOption::HOST, "host",
SessionOption::PORT, 33060,
SessionOption::USER, "<user>",
SessionOption::PWD, "<pwd>",
SessionOption::CONNECT_TIMEOUT, 30000 // Sets connection timeout in milliseconds
);

But 10s is more than enough, IMO.

Server side, probably check max connections... or, if possible, check if connections are getting to the server... I would bet more on this...

Luís

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Connection Timeout on remote DB connection
312
December 02, 2019 05:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.