[Freeswitch-users] Is MySQL OK to use?

Luis Daniel Lucio Quiroz luis.daniel.lucio at gmail.com
Thu Apr 7 02:55:10 MSD 2016


Let me get home and I will post releases I have. Checkout I hold about 10
FreeSWITCH using MySQL as a backbend without issues
Le 6 avr. 2016 6:35 PM, "Steven Ayre" <steveayre at gmail.com> a écrit :

> It's within the MyODBC driver and not within the libmysqlclient library
> which means the driver is not thread-safe even if you're using
> libmysqlclient_r. Incidentally in recent versions libmysqlclient is
> thread-safe and libmysqlclient_r is just a symlink to libmysqlclient.
>
> On 6 April 2016 at 17:20, Michael Jerris <mike at jerris.com> wrote:
>
>> This sounds like a bug in the mysql driver then right?  If those are not
>> threadsafe then the driver should protect against use where it is not safe.
>>
>> On Apr 6, 2016, at 5:44 AM, Steven Ayre <steveayre at gmail.com> wrote:
>>
>> I've been doing some debugging on this this week as we're currently
>> seeing regular crashes on our production servers. This happens with both
>> Threading=0 and Threading=2.
>>
>> It appears it's a bug in MyODBC triggered because FreeSWITCH uses a new
>> ODBC environment handle every time it creates a connection.
>>
>> When a environment handle is created myodbc_init is called and when it's
>> freed it calls myodbc_end. Those functions are not thread-safe. They're
>> protected by a reference counter but they aren't wrapped in a mutex so if
>> the server is busy and they're both called at the same time you can result
>> in some global variables being used after they're freed.
>>
>> Rebuilding MyODBC with an empty myodbc_end appears to stop the crashes,
>> but I'm not saying that's a good solution. Still looking at it.
>>
>> On 22 November 2013 at 20:31, Anthony Minessale <
>> anthony.minessale at gmail.com> wrote:
>>
>>> I've always seen Threading=0 as the solution to stability probs.
>>> Basically if the driver already uses mutexing, its better to disable the
>>> arbitrary ones in the core of odbc.
>>> For postgres 0 is basically mandatory.
>>>
>>>
>>>
>>> On Fri, Nov 22, 2013 at 2:12 AM, Steven Ayre <steveayre at gmail.com>
>>> wrote:
>>>
>>>> No such thing in the latest versions, they're all threadsafe now (_r is
>>>> a symlink to the other).
>>>>
>>>> I use it with success. I did find stability problems in libmyodbc when
>>>> upgrading from 5.0 to 5.5. My solution was to add these to odbc.ini
>>>>
>>>> Option      = 67108864
>>>> Threading   = 2
>>>>
>>>> The Threading setting is what stopped the crashes. There's a Jira on
>>>> the subject and someone else said manually upgrading to a newer version of
>>>> unixodbc+myodbc also fixed it.
>>>>
>>>> -Steve
>>>>
>>>>
>>>>
>>>> On 21 November 2013 18:23, Jeff Leung <jleung at v10networks.ca> wrote:
>>>>
>>>>> Try the non-thread safe MySQL library instead of the thread safe one.
>>>>>
>>>>>
>>>>>
>>>>> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
>>>>> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Vik
>>>>> Killa
>>>>> *Sent:* Thursday, November 21, 2013 10:22 AM
>>>>> *To:* FreeSWITCH Users Help
>>>>> *Subject:* Re: [Freeswitch-users] Is MySQL OK to use?
>>>>>
>>>>>
>>>>>
>>>>> short answer no.
>>>>>
>>>>> use postgres
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Nov 21, 2013 at 12:41 PM, Alex Lake <alex at digitalmail.com>
>>>>> wrote:
>>>>>
>>>>> I find these "Error in my_thread_global_end()" messages somewhat
>>>>> annoying in my fs1.2stable on Ubuntu12.04 box. Is there any advice
>>>>> (other than "don't use MySQL") for how to install it better? Might it
>>>>> be
>>>>> something to do with thread-safe libraries (I'm using libmyodbc_r.so at
>>>>> the moment)
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>>>> http://www.cudatel.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://wiki.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:
>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>>>> http://www.cudatel.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://wiki.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:
>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>>
>>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>>> http://www.cudatel.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://wiki.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>>
>>>
>>>
>>> --
>>> Anthony Minessale II
>>>
>>> FreeSWITCH http://www.freeswitch.org/
>>> ClueCon http://www.cluecon.com/
>>> Twitter: http://twitter.com/FreeSWITCH_wire
>>>
>>> AIM: anthm
>>> MSN:anthony_minessale at hotmail.com
>>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>>> IRC: irc.freenode.net #freeswitch
>>>
>>> FreeSWITCH Developer Conference
>>> sip:888 at conference.freeswitch.org
>>> googletalk:conf+888 at conference.freeswitch.org
>>> pstn:+19193869900
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>>> http://www.cudatel.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://wiki.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160406/d32d7155/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list