Yii Framework Forum: IE timeout, FF ok during Ajax Request - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

IE timeout, FF ok during Ajax Request Rate Topic: -----

#1 User is offline   jule 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-June 10

Posted 23 June 2010 - 07:18 AM

Hi all,
I am writing a quite big application with yii 1.1.1. The Yii application is called by an ajax Request from a static html page (don't ask why - that's the only way to do it in this case):
<div id="form">
	<script type="text/javascript">
			  
	// CBE - car booking engine
	jQuery(document).ready(function(){
	       	 var dataString = 'lang_id=de';
	       		
		 var request = jQuery.ajax( {
				type: "post",
				url: "index.php",
				dataType: 'html',
				data: dataString,
				cache: false,
				success: function(html)
				{
					jQuery("#form").html(html);
				}
			});
		});
	</script>
     </div>


The default action shows a form that, after sending, calls an action that renders some stuff and then renders a widget, that also will get and render some data by an ajax call.
This ajax call takes about 3-13 seconds (depending on the XML-interface that i have to connect to to get the data from).
In Firefox everything works fine, the ajax response gets and renders the data and the content of the div will be replaced by the (json-encoded) response of the ajax request.
In IE (7 and 8 ) nothing happens - the waiting animation is running and running and will never stop.
I tried nearly everything:
  • simulate the ajax actions and return only static (and json-encoded) html (this works fine - but is only faked content!)
  • getting the data in a parallel process that uses the same session (still the error in ie)
  • shut down my anti virus program (still the error in ie)
  • changed keep alive to big values (still the error in ie)
  • removed fire php from my application (still the error in ie)
  • tried jQuery 1.3.2 instead of 1.4.2 (still the error in ie)


Using jQuery ajax error function returns the status code 8 in the XMLHttpRequest object. I never found anything about this status code. It seems that it doesn't exist. The textStatus and errorThrown are empty.

But now the really funny part comes. Using fiddler2 (http debugging proxy) the ajax call in IE RETURNS the output - but the IE won't display it. Only fiddler2 shows it in the inspector.
That's why we suggested that it could be a timeout problem and tried a simple script that only makes a sleep(10) and then echo "hello world". the ie shows it's screen for network problems after some time and the XMLHttpRequest status is 12002 (timeout).
But I don't think this is the same problem, because of the different XMLHttpRequest status.

Has anyone ever had a similar bug or ANY idea that could help ??
I'm trying about one week now and I'm truly despaired.. :(

We now found out, that the status code 8 is a winsock error code and means WSA_NOT_ENOUGH_MEMORY - insufficient memory available (http://msdn.microsof...28VS.85%29.aspx).
But sometimes I get the winsock error 8 and sometimes the 12002 from my ajax error function .. very, very weird..


Thx!!!
Jule

This post has been edited by jule: 23 June 2010 - 10:17 AM

0

#2 User is offline   jule 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 23-June 10

Posted 26 July 2010 - 05:31 AM

Ok I fixed it by myself, after a very very long time doing optimizations, bugfixing, googeling etc.
In my application I have some widgets that are called and updated via ajax. These widgets are binded and triggered by javascript.
I had many session accesses (loading values) in theses widgets. That means, that there were many parallel session accesses happening. The session will be locked during an access, so the others have to wait. Maybe the IE doesn't like too much parallel session accesses or too long waiting queries :)
After moving ALL reading session accesses to the controller only, the error didn't occur again.
So I have moved every reading session access to the controller and all necessary values for the widgets or views have to be passed from the controller via the view to the widget and the widgets that this widget maybe calls :)
Hope that helps anybody saving very much time ;)
0

#3 User is offline   fastcrash 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 245
  • Joined: 10-March 10
  • Location:South Jakarta

Posted 26 July 2010 - 05:57 AM

Quote

Ok I fixed it by myself, after a very very long time doing optimizations, bugfixing, googeling etc.

Woaahhh.. you are really a though one!
keep that spirit.. :P
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users