-
13 Mar 2011 1:35 PM #1
Restful Store with autosave=true sends multiple POST (add) requests to the server
Restful Store with autosave=true sends multiple POST (add) requests to the server
This is really easy to duplicate. Create a store that is restful and hooked up to your server. Set the store to autosave=true
* set a break point in your server's POST handler
* add a new element to the store
* observe that it sends a POST to your server
* now update another element in your store
* observe that it sends a PUT for the change and a POST for the previous add.
* now let your server run and you will indeed see that the POST happens twice and your poor server will likely add the element twice because the server is responsible for creating the record ID.
So when this happens we see that for these two changes to the store, it sends these three messages to the server:
POST
POST
PUT
This has really bad consequences on the server. We found this when using our application of a WAN link so the response time of the server was slower than the user clicking on another UI element that updated the store. This is super easy to reproduce.
I would have expected the store to know that it already sent the POST and that the POST has not yet timed out.
Greg
-
30 Aug 2012 5:56 AM #2
I am having this same problem in Ext 4.1. The Restful Store has autosync = true but sends multiple POST request to the server on every other add. Any update on this bug?
Thank you for reporting this bug. We will make it our priority to review this report.
Similar Threads
-
directStore with a JsonWriter sends no data with autoSave: true
By bareflix in forum Ext.DirectReplies: 7Last Post: 14 Aug 2011, 8:40 AM -
[OPEN] [OPEN]Store autoSave: true does not work
By oe.elvik in forum Ext:BugsReplies: 3Last Post: 13 Mar 2011, 1:41 PM -
How to avoid autoSave store from sending multiple requests to the server? (esp. Add)
By Greg.Veres in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 27 Feb 2011, 11:02 AM -
Too Many Requests Issued When Updating Multiple Records in Restful Store
By aleg in forum Ext 3.x: BugsReplies: 2Last Post: 21 Jan 2011, 1:58 PM -
[OPEN-702] RESTful store/proxy sends multiple HTTP requests
By Cannon in forum Ext 3.x: BugsReplies: 6Last Post: 20 May 2010, 7:16 PM


Reply With Quote