• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

AJAX Status Code of 8

 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Has anyone ever encountered a status code of 8 before from an AJAX call? If so, what ended up being the culprit?
 
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The server-side code sets the HTTP status. 8 is not a valid value.
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Bear (and all), here's what some googling did for me afterwards. I'm assuming I'm getting the status code 8 from this. http://msdn.microsoft.com/en-us/library/ms740668%28VS.85%29.aspx Any ideas (if so) on how to overcome this? Thanks again.
 
Bear Bibeault
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using Windows sockets? If so, that might have been pertinent info to include.

If not, what are you hitting with the request?
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using an Ajax call in my javascript. I'm not 100% sure if it would tie in or not but thought I would post. When I put in a print of the object.status it gives me 8. I tried redirecting the STDOUT of my server-side script I call and the contents print out perfect. This Ajax call does work, however, if the amount of data being sent to the server is smaller. If I select 5-8 items or so on a page and send to the server in an Ajax call it works but 12 or more causes the status to turn to 8 (readyState is 4). Seeing that the error mentioned here was 8 and linked to memory limitation I thought this may be the cause. Any further thoughts? Thanks for the reply as well.
 
Bear Bibeault
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're still not answering my questions.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Are you using Windows sockets? If so, that might have been pertinent info to include.



This is what IE uses with the XHR request.

 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rob Hunter wrote: 12 or more causes the status to turn to 8 (readyState is 4).



12 or more means what? How much data is transferred when you select 12 items?

Eric
 
Bear Bibeault
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Eric Pascarello wrote:This is what IE uses with the XHR request.


Eesh! And it reveals that with non-standard status codes?

Where's the "sadly shakes head" smilie? I guess this one will have to do.

What happens when you try it in a real browser?
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
12 or more is referring to the number of "items" that are being added to a "shopping cart". The exact size (amount) of data I'm not exactly sure the precise measurement on the pass and on the fail. I tried it on 2 more systems and the exact search results I try to add varies amongst machines BUT the number remains consistent on what can and cannot be added on each machine (i.e. allows 8 on one and fails on 9 always on machine 1, allows 12 and fails on 13 on another always, etc..,). The user is allowed to select radio buttons on what they want to add to the cart and THEN click a button to add the item (each item has hidden field values tied to them - script needs additional info per item). Where does one increase the size for this or can you? This obviously would be a poor solution - i.e. asking users to fix such a setting - but could you suggest an alternative approach? Thanks again for the responses.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do not know what is being posted to the server???

Eric
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know what's being posted, just have to throw in a dialog to grab the content but since the amount of data varies from machine to machine would posting the length of the content help in diagnosing here? It doesn't just vary a little on each computer and between each computer. The amount of data able to be sent on each computer (without error) is about the same (on each attempt) but varies more dramatically between computers. Since it appears to be a winsock error where would I increase the memory allocated for that? What would be the best approach to avoid the error? I was thinking along the lines of breaking the one time AJAX call to add all items into a loop through the items being added instead, cut down on the amount of data sent on each call. Thanks again.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ALL I AM ASKING IS IT KB OF DATA OR BYTES OF DATA?



Eric
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
KB. Average data that will be sent will range from 1-2K up to 5K.
 
Bear Bibeault
Sheriff
Posts: 67645
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's miniscule. What's happening on the server? Are you writing your own actions? Servlets? PHP? Cold Fusion? What?
 
Rob Hunter
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An existing Perl script is what's called. If I redirect the output to a file on successful runs and on error runs the content that should be passed back all looks pretty much the same. The only information passed back is xml content that has 2 tags - how many items on cart and the monetary value of what's on the cart.
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the browsers cache full? Sometimes that does weird things.

Eric
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic