[storm] Storm and MySQL in WSGI environment - MySQL server run away

Steve Kieu msh.computing at gmail.com
Thu Jan 27 00:01:35 UTC 2011


Hello,

Is there any method that allow me to check the connection status from the
Store object? I think of a way like do a store.execute("some lowest cost sql
here") and catch the exception then if has then recreate the store object
but it does look clean to me.

Cheers


On Wed, Jan 26, 2011 at 11:26 PM, Steve Kieu <msh.computing at gmail.com>wrote:

> OK I found a shorter work around. I force that every time a new request
> coming, I create new store object to be used for all other Storm object.
> This seems to work until now. I did not feel it is slower because it has to
> make a new connection every time  - mysql connection is low cost I believe.
>
> I use storm with ISAM for some other apps and hit no problem at all - this
> is the first web app.
>
> Thanks a lot for help
>
>
>
> On Wed, Jan 26, 2011 at 11:16 PM, Jamu Kakar <jkakar at kakar.ca> wrote:
>
>> Hi,
>>
>> On Wed, Jan 26, 2011 at 1:48 PM, Steve Kieu <msh.computing at gmail.com>
>> wrote:
>> > I use  MyISAM engine thus there is no transaction. In the action_*
>> method it
>> > call the Storm object whether to create new or get existing one from DB
>> or
>> > to do some thing like search, etc. In each Storm object
>> the constructor just
>> > create the object and call storm.flush() or commit() right away.
>> > Yeas, I think I have to wrap all Storm object called from all action_*
>> to
>> > deal with that case.
>> > .. which is a bit daunting task. I will try later to see if it is better
>> > Many thanks :-)
>>
>> Storm is designed with the assumption that serializable transactions
>> will be used.  If you're using a backend engine with MySQL that
>> doesn't provide transaction support it's possible you'll run into
>> weird problems.  The 'InnoDB' engine is the one that we test Storm
>> with.
>>
>> Thanks,
>> J.
>>
>
>
>
> --
> Steve Kieu
>



-- 
Steve Kieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/storm/attachments/20110127/503a0151/attachment.html>


More information about the storm mailing list