Being new to mailing list I have sent two massages hoping to respond to my post. But instead sending replies to individuals. My apologies.
I was able to track the bug. To cut to the chase, the main problem is not pyramid related, atleast that is my understanding. Source of the problem is that I use angularjs for my UI, and have erroneously imported the angular script in both my base.html and a template extending it. As a result, every post/get request I made in angularjs was duplicated. I don't know why this is the case really, but it makes some sense. Making this bug hard to trace was the fact that I was also getting duplicate logs in my logfiles on my server. This was due to my logging configurations. Not related to the bigger problem at all. Thanks for all the help and support. On Thursday, July 11, 2013 12:02:23 PM UTC-4, saneletm wrote: > > I have a pyramid application with two API (also pyramid packages). > My problem is that everytime I run a session. There seem to be another > session running, > leading to duplicate POST/GET requests, and Database entries. > > A sample log from this browser console will look like this: > > new:132 <http://10.1.2.108/performance/new> > Object {city: "city1", state: "state1", contactPhone: "###", name: "nameA" > , contactName: "JA"…} > new:288 <http://10.1.2.108/performance/new> > 2013-07-11 new:294 <http://10.1.2.108/performance/new> > Object {city: "city1", state: "state1", contactPhone: "###", name: "NameA" > , contactName: "JA"…} > new:288 <http://10.1.2.108/performance/new> > 2013-07-11 new:294 <http://10.1.2.108/performance/new> > > > A sample log on my terminal: > > DEBUG:txn.-1243817152:commit > <zope.sqlalchemy.datamanager.SessionDataManager object at 0xb2e51f4c> > DEBUG:txn.-1243817152:commit > DEBUG:txn.-1268995264:abort > DEBUG:txn.-1268995264:new transaction > DEBUG:beaker.container:data file > /home/saneletm/enthenergy/source/etireports/etirweb/data/sessions/data/container_file/c/c2/c2526f45a04d4789ad3c7a85b3eaaba6.cache > DEBUG:txn.-1268995264:commit > <zope.sqlalchemy.datamanager.SessionDataManager object at 0xa57c72c> > DEBUG:txn.-1268995264:commit > DEBUG:txn.-1252209856:commit > <zope.sqlalchemy.datamanager.SessionDataManager object at 0xb2e51eec> > DEBUG:txn.-1252209856:commit > > Looking at my db table, I can see that everytime I try to create an entry, > I actually get two entries, with ids i, and i+1 > > > Does anybody have an idea what would cause this? > I will greatly appreciate any help, and wiling to attach copies of any of > my files. > > > Thank you, > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss. For more options, visit https://groups.google.com/groups/opt_out.
