[sqlalchemy] watining for table metadata lock

2013-08-29 Thread diverman
Hi, we observed deadlock-like problem on our multi-component system with mysql database. Our setup: 1) MySQL server 5.5 with many MyISAM tables Foo_timestamp, one per day (like partitioning) 2) C++ backend daemon * issuing CREATE TABLE IF NOT EXISTS Foo_timestamp (...) once per day after

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread Simon King
On Thu, Aug 29, 2013 at 4:48 PM, diverman pa...@schon.cz wrote: Hi, we observed deadlock-like problem on our multi-component system with mysql database. Our setup: 1) MySQL server 5.5 with many MyISAM tables Foo_timestamp, one per day (like partitioning) 2) C++ backend daemon *

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread Simon King
On Thu, Aug 29, 2013 at 5:20 PM, Simon King si...@simonking.org.uk wrote: On Thu, Aug 29, 2013 at 4:48 PM, diverman pa...@schon.cz wrote: Hi, we observed deadlock-like problem on our multi-component system with mysql database. Our setup: 1) MySQL server 5.5 with many MyISAM tables

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread diverman
Hi, of course I searched the web before submitting the question. None of them pointed to what is the real problem. This can be easily reproduced with sqlalchemy: *console 1:* mysql create table if not exists Foo (i int) engine MyISAM; Query OK, 0 rows affected (0,00 sec) mysql *console

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread Jonathan Vanasco
MyISAM doesn't support transactions, but it does support locking. According to the docs, it actually relies on table locking for certain operations. What are your sqlalchemy connection strings for the engine ? Have you tried explicitly setting autocommit mode within the query ? Have you tried

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread Simon King
On Thu, Aug 29, 2013 at 6:01 PM, diverman pa...@schon.cz wrote: Dne čtvrtek, 29. srpna 2013 18:23:12 UTC+2 Simon King napsal(a): On Thu, Aug 29, 2013 at 5:20 PM, Simon King si...@simonking.org.uk wrote: On Thu, Aug 29, 2013 at 4:48 PM, diverman pa...@schon.cz wrote: Hi, we observed

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread diverman
Hi Jonathan, I don't use any special connection parameters. All are defaults. I I execute engine.execute('set autocommit=1;') foo = engine.execute('select * from Foo;') ...then on other console CREATE TABLE IF NOT EXISTS Foo(i int) don't block. So it seems it's an application bug.

Re: [sqlalchemy] watining for table metadata lock

2013-08-29 Thread diverman
I'm not quite sure what your point is. I was trying to figure out if that's a bug in worker, sqlalchemy, mysql or elsewhere, since I was unable to reproduce it in development environment, only in laboratory conditions using commands I posted to my previous e-mail. -- You received this