MySpace Open Platform

A Place For Developers

Welcome Developers!

in

Welcome!

in

makerequest timeout 500

Last post 03-25-2009 4:36 AM by Ken. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 03-24-2009 9:55 AM

    • Ken
    • Top 500 Contributor
    • Joined on 12-23-2008
    • Posts 13

    makerequest timeout 500

    Hello! When i make a makerequest call, once at about 15 requests, i get the following error (catched with firebug): { "errorMessage" : "Request timed out waiting to connect to your server" } The error code is 500 and the time between the request and the response is more than 2 sec (almost everytime either 2.58 or 3.42 sec) When i make the same request again, it works very well. The requested file is either a html, either a php one, so it's not something in the code. Does anybody else gets something like that? What could it possible be? From the browser, when accessing the files, it never fails to load them, and the load is preety fast.
  • 03-24-2009 11:20 AM In reply to

    Re: makerequest timeout 500

    I am seeing the same, both yesterday and this morning.  It is happening fairly frequently in our Mind Games app. When I buy or sell a prize in our game, about 1 in 10 times (i.e. 1 in 10 makerequests) it would result in that timeout.  Firebug showed every one as timing out in 2.14 seconds (seems like a short timeout!).

    Then about 1/2 an hour a go I was trying to reproduce it and must have done about 100 requests with no timeout.  However, now it is back to timing out sometimes. 

    Our servers seem fine - very lightly loaded.  My guess is that some of the MySpace proxy servers are down or overloaded or just plain screwy.

  • 03-24-2009 12:19 PM In reply to

    Re: makerequest timeout 500

     Hi guys, I'm checking in to this

  • 03-24-2009 12:28 PM In reply to

    Re: makerequest timeout 500

     Can you please provide AppIDs and OS versions?

  • 03-24-2009 2:37 PM In reply to

    • Ken
    • Top 500 Contributor
    • Joined on 12-23-2008
    • Posts 13

    Re: makerequest timeout 500

    AppId = 123774 (the application is in pending right now) OS = 0.7 Thanks
  • 03-24-2009 3:11 PM In reply to

    Re: makerequest timeout 500

    Our Mind Games app is live (approved); the id is: 128679

    I'm using FireFox 3.0.7 with FireBug 1.3.3, on Windows XP SP3.

    It is an OpenSocial 0.8 app.

  • 03-24-2009 4:25 PM In reply to

    • Ken
    • Top 500 Contributor
    • Joined on 12-23-2008
    • Posts 13

    Re: makerequest timeout 500

    I have tried requesting the files from another server, and the same thing happens, so i don't think it's a problem from our servers.
  • 03-24-2009 4:35 PM In reply to

    Re: makerequest timeout 500

    I've escalated this, so hopefully we get some answers soon.
    Rhonda

     

  • 03-24-2009 4:43 PM In reply to

    • Chak
    • Top 50 Contributor
    • Joined on 01-14-2008
    • Posts 70
    • MDP Team

    Re: makerequest timeout 500

    Hi,

     You will see this error under the following conditions:

    1. The makerequest is using a POST

    and

    2. If it takes MySpace's proxy servers more than 2 seconds to *just* get the HTTP request stream to the 3rd party server so that we send the POST data to the 3rd party servers.If we can't get the request stream in 2 seconds we abort the request and send that error message to the client.

    Please also note that we also have the following timeouts (for both GETs and POSTs):

    ReadTimeout: Time-out for reading from an HTTP stream

    WriteTimeout:  Time-out for writing to an HTTP stream

     Due to the huge volume of makerequest() calls we get from several hundred apps, we have to enforce these timeouts since our processes/threads cannot block due to servers that are slow from time to time. If we were to increase the timeouts and/or wait indefinitely for a server to respond requests will start queueing up on our servers (and due to a max queue size) and the web server will start sending out 503s.

     Unfortunately, this is the tradeoffs we have to make.

     If you don't absolutley need to use POSTs, my suggestion would be the following:

    1. Use GETs

    2. Maintain persistent connections i.e. do NOT close the connection after you send out responses from your script/servlet etc.

    With GETs and persistent connections we should be able to use HTTP pipelining so that we can pump more requests  per connection (assuming you're running an HTTP1.1 compliant web server)

     In either case, you should run some benchmarks against your own servers to see how it performs under  load. Please note that most calls coming thru' our system complete anywhere from 100ms to well under a second for the entire request end to end.

     Thanks

    Chak

    Filed under:
  • 03-25-2009 4:36 AM In reply to

    • Ken
    • Top 500 Contributor
    • Joined on 12-23-2008
    • Posts 13

    Re: makerequest timeout 500

    Thank you very much for your response. I have changed almost all requests to GET and the error doesn't show anymore. Thanks again!
Page 1 of 1 (10 items)