While I have my slapd-server completely up and running, I do have one obstacle. The sql connection disconnects after some time of idling (MySQL server has gone away). Probably because the maximum seconds of idling has been reached. This means I have to restart slapd to fix the connection. I could open a cronjob to do that, but that's more a last-resort-solution.
Is there a config option for reconnection or is there another possible solution? I could imagine that slapd would try to reconnect in case it loses sql connection because this could happen for all sort of reaons.
Server information: I am on Debian Squeeze using openldap 2.4.17, recompiled with back-sql and openssl. The sql server is MySQL 5/InnoDB. I do not have full control over the sql server. So I cannot add a user without idling limit.
While I have my slapd-server completely up and running, I do have one obstacle. The sql connection disconnects after some time of idling (MySQL server has gone away). Probably because the maximum seconds of idling has been reached. This means I have to restart slapd to fix the connection. I could open a cronjob to do that, but that's more a last-resort-solution.
Is there a config option for reconnection or is there another possible solution?
No. Yes, operations could be retried when they fail because the server disconnected (and in general back-sql should do its best to retry operations, much like other proxy backends do).
I could imagine that slapd would try to reconnect in case it loses sql connection because this could happen for all sort of reaons.
There is a request for a similar capability. See ITS#5796. Patches are welcome, as usual :).
p.
Then I am going to try to patch it. Unfortunately, I have very limited C knowledge. But when I have managed, I will post the patch on ITS.
Frederik
On 09/07/2010 01:01 PM, masarati@aero.polimi.it wrote:
While I have my slapd-server completely up and running, I do have one obstacle. The sql connection disconnects after some time of idling (MySQL server has gone away). Probably because the maximum seconds of idling has been reached. This means I have to restart slapd to fix the connection. I could open a cronjob to do that, but that's more a last-resort-solution.
Is there a config option for reconnection or is there another possible solution?
No. Yes, operations could be retried when they fail because the server disconnected (and in general back-sql should do its best to retry operations, much like other proxy backends do).
I could imagine that slapd would try to reconnect in case it loses sql connection because this could happen for all sort of reaons.
There is a request for a similar capability. See ITS#5796. Patches are welcome, as usual :).
p.
Then I am going to try to patch it. Unfortunately, I have very limited C knowledge. But when I have managed, I will post the patch on ITS.
I used to be the unofficial maintainer of back-sql; I haven't needed it for years, and lack of time does not allow me to take care of it, let alone the fact that a portable and RDBMS-neutral back-sql is a mess and a nightmare. I don't even have a test environment handy. I hope someone interested in its survival takes it over.
Thanks for your try. p.
While googling for reconnect in the ODBC API I found this: http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connecti...
option 4194304: Enables auto-reconnection functionality. It seems like it fixes my problem. I will post it under the ITS too.
On 09/07/2010 01:15 PM, masarati@aero.polimi.it wrote:
Then I am going to try to patch it. Unfortunately, I have very limited C knowledge. But when I have managed, I will post the patch on ITS.
I used to be the unofficial maintainer of back-sql; I haven't needed it for years, and lack of time does not allow me to take care of it, let alone the fact that a portable and RDBMS-neutral back-sql is a mess and a nightmare. I don't even have a test environment handy. I hope someone interested in its survival takes it over.
Thanks for your try. p.
While googling for reconnect in the ODBC API I found this: http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-connecti...
option 4194304: Enables auto-reconnection functionality. It seems like it fixes my problem. I will post it under the ITS too.
If you like, you could refresh the FAQ http://www.openldap.org/faq/data/cache/978.html regarding the RDBMS you're using. The FAQ-o-matic is interactive.
p.
openldap-technical@openldap.org