I am using Pyramid, SQLalchemy (with ZopeTransactionExtension), Postgresql and uwsgi and I have a problem with my web app.
So when I save object using DBSession.add(object)
and flush DBSession.flush()
I get no error and I even get the id of the newly created object, but when the page reloads I see success message but the object does not appear in the list of all objects. (No error was thrown. In PostgreSQL I can see my insert query and even COMMIT right after it)
This can be seen in API. When I create the new object it returns me it's id, 2 seconds later I delete this object and I get the error that object with this id does not exist. The problem occurs randomly (sometimes more often and sometimes less often) only on production/testing environment (not local) and disappears after rebuilding (It comes back after 1-2 days of uptime).
Had someone a similar problem?