[sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread pr64
Hi, Strange behaviour with sqa in multi-process environment... already posted on StackOverflow for a web app but still missing some understanding so posting here. I've created an application where my sqa calls are encapsulated: My API's methods always do the same kind of stuff: 1- request

[sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread pr64
Hi, Strange behaviour with sqa in multi-process environment... already posted on StackOverflowhttp://stackoverflow.com/questions/21109794/delayed-change-using-sqlalchemyfor a web app but still missing some understanding so posting here. I've created an application where my sqa calls are

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread Richard Gerd Kuesters
i was having this kind of problem while using a multi-threaded app, but with a postgres backend. in postgres, with high-concurrency, i was expecting this kind of behaviour, so i had to implement some simple semaphores to make it work properly -- sqlalchemy is not to blame if something changes

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread Claudio Freire
On Mon, Jan 20, 2014 at 1:51 PM, Richard Gerd Kuesters rich...@humantech.com.br wrote: i was having this kind of problem while using a multi-threaded app, but with a postgres backend. in postgres, with high-concurrency, i was expecting this kind of behaviour, so i had to implement some simple

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread pr64
Thanks for your comments. I'm using sqlite in default mode (which is synchronous) and here's my engine configuration. engine = create_engine('sqlite:///my_db.sqlite', connect_args={'detect_types': sqlite3.PARSE_DECLTYPES|

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread Richard Gerd Kuesters
heavely awkward question: you said that the error occurs in memory and in disk. is your disk a ssd? trim enabled, noatime in fstab, deadline as scheduler. any of these? On 01/20/2014 03:05 PM, pr64 wrote: Thanks for your comments. I'm using sqlite in default mode (which is synchronous) and

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread Michael Bayer
On Jan 20, 2014, at 11:12 AM, pr64 pierrerot...@gmail.com wrote: Hi, Strange behaviour with sqa in multi-process environment... already posted on StackOverflow for a web app but still missing some understanding so posting here. I've created an application where my sqa calls are

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread Michael Bayer
On Jan 20, 2014, at 3:59 PM, pr64 pierrerot...@gmail.com wrote: OK, sorry for my explanation which is not right. I launch two separate processes from the command line. Each is importing my API and therefore creates its own connection to the sqlite database. Commiting in process 1 should

Re: [sqlalchemy] Strange behaviour in multi-process environment

2014-01-20 Thread Richard Gerd Kuesters
well, that's why I asked about his FS config earlier today. I got some strange behaviors from sqlite using ssd drives with some specific set of options for the filesystem; but I'm also not using the latest version of sqlite ... 3.7.9 here, as of ubuntu 12.04 lts. I really didn't narrowed it