Re: MySQL Server connection timeout or keep-alive

2018-04-03 Thread John Ralls


> On Apr 3, 2018, at 1:06 PM, Colin Law  wrote:
> 
> On 3 April 2018 at 19:40, Paul Neuwirth  > wrote:
> > ...
> I am wondering, if no keep-alive is going to be implemented, if a
> connection loss could be catched and connect again..
> the error message is:
> "Unable to save to database."
> 
> That is not unreasonable on connection loss. What happens after that?

I think that the session dies and given the current architecture that’s 
probably the right thing to do. GnuCash isn’t yet a database front end and the 
database connection code is tied into loading the database into memory. An 
outright crash or freeze would be bad, but restarting GnuCash or switching to a 
different book and switching back is at present the only safe course.

Regards,
John Ralls


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Re: MySQL Server connection timeout or keep-alive

2018-04-03 Thread Paul Neuwirth

On Tuesday 2018-04-03 22:06, Colin Law wrote:


Date: Tue, 3 Apr 2018 22:06:08
From: Colin Law <clan...@gmail.com>
To: Paul Neuwirth <m...@paul-neuwirth.nl>
Cc: John Ralls <jra...@ceridwen.us>, gnucash-user <gnucash-user@gnucash.org>
Subject: Re: MySQL Server connection timeout or keep-alive

On 3 April 2018 at 19:40, Paul Neuwirth <m...@paul-neuwirth.nl> wrote:


...

I am wondering, if no keep-alive is going to be implemented, if a
connection loss could be catched and connect again..
the error message is:
"Unable to save to database."



That is not unreasonable on connection loss. What happens after that?

Colin



Indeed, I did not try yet. I always restarted gnucash when it happened.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: MySQL Server connection timeout or keep-alive

2018-04-03 Thread Colin Law
On 3 April 2018 at 19:40, Paul Neuwirth  wrote:

> > ...
> I am wondering, if no keep-alive is going to be implemented, if a
> connection loss could be catched and connect again..
> the error message is:
> "Unable to save to database."
>

That is not unreasonable on connection loss. What happens after that?

Colin
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: MySQL Server connection timeout or keep-alive

2018-04-03 Thread Paul Neuwirth
> >> Hello,
> >> is it possible to change somewhere the connection timeout to a
> >> MySQL server on the client side?
> >> Or could it be possible to implement a keep-alive?
> >> Everytime the connection is lost, I need to restart gnucash.  
> >
> > I don't think that it's possible from the client. IIUC (and I'm not
> > a MySQL expert, but if you're using it you should be or you should
> > hire one) it's a server-side parameter called wait_timeout.
> >
> > No, we're not going to add a keep-alive.
> > https://stackoverflow.com/questions/23399111/safely-keeping-mysql-connections-alive
> > says that a connection pool is the right way to handle this, but
> > the database abstraction library we use doesn't support that so
> > it's not going to get added any time soon.  
> 
> However if GnuCash fails in a non-recoverable way when you lose the
> connection I would have thought that would be a bug.  What exact
> symptom are you seeing?
> 
> Colin

I am wondering, if no keep-alive is going to be implemented, if a
connection loss could be catched and connect again..
the error message is:
"Unable to save to database."

regards,
paul
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: MySQL Server connection timeout or keep-alive

2018-04-03 Thread Colin Law
On 2 April 2018 at 22:28, John Ralls  wrote:
>
>
>> On Apr 2, 2018, at 8:39 AM, Paul Neuwirth  wrote:
>>
>> Hello,
>> is it possible to change somewhere the connection timeout to a MySQL
>> server on the client side?
>> Or could it be possible to implement a keep-alive?
>> Everytime the connection is lost, I need to restart gnucash.
>
> I don't think that it's possible from the client. IIUC (and I'm not a MySQL 
> expert, but if you're using it you should be or you should hire one) it's a 
> server-side parameter called wait_timeout.
>
> No, we're not going to add a keep-alive. 
> https://stackoverflow.com/questions/23399111/safely-keeping-mysql-connections-alive
>  says that a connection pool is the right way to handle this, but the 
> database abstraction library we use doesn't support that so it's not going to 
> get added any time soon.

However if GnuCash fails in a non-recoverable way when you lose the
connection I would have thought that would be a bug.  What exact
symptom are you seeing?

Colin
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: MySQL Server connection timeout or keep-alive

2018-04-02 Thread John Ralls


> On Apr 2, 2018, at 8:39 AM, Paul Neuwirth  wrote:
> 
> Hello,
> is it possible to change somewhere the connection timeout to a MySQL
> server on the client side?
> Or could it be possible to implement a keep-alive?
> Everytime the connection is lost, I need to restart gnucash.

I don't think that it's possible from the client. IIUC (and I'm not a MySQL 
expert, but if you're using it you should be or you should hire one) it's a 
server-side parameter called wait_timeout.

No, we're not going to add a keep-alive. 
https://stackoverflow.com/questions/23399111/safely-keeping-mysql-connections-alive
 says that a connection pool is the right way to handle this, but the database 
abstraction library we use doesn't support that so it's not going to get added 
any time soon.

Regards,
John Ralls


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


MySQL Server connection timeout or keep-alive

2018-04-02 Thread Paul Neuwirth
Hello,
is it possible to change somewhere the connection timeout to a MySQL
server on the client side?
Or could it be possible to implement a keep-alive?
Everytime the connection is lost, I need to restart gnucash.
Thank you
Paul
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.