[Dxspider-support] Bugreport/Issue: Reconnect to SQL Server

Dirk Koopman djk at tobit.co.uk
Tue Sep 5 15:21:36 BST 2023


$self->do($s) is a wrapper for the perl DBI "do" command. Or, in other 
words, execute an imperative SQL command not expecting a reply, e.g. 
"insert into spot values (...)".

On 04/09/2023 19:53, Johannes Fellner via Dxspider-support wrote:
> Thank you Dirk for the quick answer.
>
> As a hobby programmer doing Python I struggle with Perl so I am not much
> help unfortunately. Otherwise I would have suggested some code.
>
> What about when the "db do" fails try a reconnect? Or is that a to 
> sloppy?
>
> 73 Joe, OE5JFE
>
>
> On 04.09.2023 14:32, Dirk Koopman via Dxspider-support wrote:
>> I agree, this is a feature tending toward a bug.
>>
>> This equivocation is because the "mysql" linkage is "available" but
>> not "supported". The "mysql" link was written  I have never used this
>> "mysql" link myself more than checking that it "worked". The module
>> was written in 2006 and last modified (in a major way) in 2012. There
>> is no error checking of any kind (as a quick look at DXQsl.pm will 
>> show).
>>
>> Adding "error checking", in a database agnostic way, could be a
>> problem. Currently it will need to cope with SQLite, Postgres and
>> MySql/MariaDB.
>>
>> I'll look at it...
>>
>> Dirk G1TLH
>>
>> On 03/09/2023 08:55, Johannes Fellner via Dxspider-support wrote:
>>> Hello,
>>>
>>> In my activity to fully docker'ize the DXSpider setup including
>>> Webserver and MariaDB (
>>> https://github.com/DocViper666/dxspider-deployment ) I am facing the
>>> following issue.
>>>
>>> On automatic updating of the MariaDB container (stopping, rebuild
>>> container and starting the database again) the DXSpider (mojo) is not
>>> reconnecting to the database even after the database up and running
>>> again. The same would happen if the sql server stops and restarts 
>>> (after
>>> some minutes).
>>>
>>> The error log is:
>>>
>>> ___________
>>>
>>> 1692777442^(*) DBD::mysql::db begin_work failed: Turning off AutoCommit
>>> failed at /spider/perl/DXSql.pm line 90.
>>> 1692777442^(*)  at /spider/perl/DXSql.pm line 90.
>>> 1692777442^(*) DBD::mysql::db do failed: Server has gone away at
>>> /spider/perl/DXSql.pm line 85.
>>> 1692777442^(*)  at /spider/perl/DXSql.pm line 85.
>>> 1692777442^(*) commit ineffective with AutoCommit enabled at
>>> /spider/perl/DXSql.pm line 95.
>>> 1692777442^(*)  at /spider/perl/DXSql.pm line 95.
>>>
>>> ____________
>>>
>>> Only a restart of DXSpider helps to re-establish the connection to the
>>> SQL DB again.
>>>
>>> Am I missing a config option?
>>>
>>> Expected scenario would be that after the SQL has gone away a reconnect
>>> would be attempted (for every spot or in fixed interval) to bring the
>>> connection back without restart.
>>>
>>> Thanks a lot for all the great work.
>>>
>>> 73 de Joe, OE5JFE
>>>
>>> ###
>>>
>>>
>>>
>>> _______________________________________________
>>> Dxspider-support mailing list
>>> Dxspider-support at tobit.co.uk
>>> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
>>
>>
>> _______________________________________________
>> Dxspider-support mailing list
>> Dxspider-support at tobit.co.uk
>> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support
>
> _______________________________________________
> Dxspider-support mailing list
> Dxspider-support at tobit.co.uk
> https://mailman.tobit.co.uk/mailman/listinfo/dxspider-support




More information about the Dxspider-support mailing list