I have a highly ajax run website where everything is running smooth as butter except one specific Ajax call. After a random number of calls it seems to never return. It's not a caching issue because I've turned off caching with $ajax.Setup and it also happens randomly, not just after the first call. Once it happens though, it will not work again until I refresh the page. I've confirmed it has nothing to do with the script on the server as I for testing purposes I just had it return immediately.
The only thing that is unique about this call is I pass a rather sizable json object that is dynamically created. I'm wondering if there is an error in the construction of the json object, though I kind of doubt it because I believe the same JSON object can be passed once and work and than passed again and not. So, my only theory at this point is it is my longest ajax call and calling it multiple times is just overloading some server threshold. Does anyone know anything about this? I'm running PHP and IIS.
Here is the simple code I use:
$.post("<?=$_SERVER['PHP_SELF']?>?ajax=editType", {id1: id1, id2: id2, json: jsonString}, function(data) {
console.log(data);
}, "html").error(function(xhr, status, error) {
alert("Error: " + status);
});
the json string is:
{"0":{"part_type_column_id":"526","displayable_name":"Fourth","column_number":1,"default_visible":"on","datatype":"Radio Button","value_options":"First Radio,Second Radio,Third Radio,Fourth Radio,Fifth Radio"},"1":{"part_type_column_id":"525","displayable_name":"Fifthd","column_number":2,"default_visible":"on","datatype":"Checkbox"},"2":{"displayable_name":"asdf","column_number":3,"default_visible":"on","datatype":"Text"}}
If I keep sending this ajax call after it doesn't immediately return, it will stop all ajax on the site until it times out. After seeming to take forever, it will time out and finally just alerts "error".
Any idea why this could be happening? All I can think of is some kind of max transfer limit being reached.