Net::Google 502 Bad gateway errors

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Net::Google 502 Bad gateway errors

    Does anyone here use the Net::Google module? It seems to run very slowly,
    and I keep getting "502 Bad gateway" errors. In the end I just downloaded
    the search page using libwww and parsed it myself, which is almost instant.

    --
    sci.lang.japan FAQ: [url]http://www.sljfaq.org/afaq/afaq.html[/url]

    Ben Bullock Guest

  2. Similar Questions and Discussions

    1. SMS Gateway
      Damon... and that means that is it possible or not ? Can you connect a mobile and send and receive SMS messages using the CFMX 7 SMS gateway?
    2. 502 bad gateway
      Hi, I created a c# windows application and I am using a web service calling the Main(string args) methos I can create the web service object,...
    3. Gateway Question
      Hi folks, I have the feeling that traffic has significantly dropped in comp.lang.ruby. Is everybody on holidays or are we (still) facing gateway...
    4. supress errors at the page level? Undefined index errors.
      I'm creating a simple reply form, and if a form item isn't answered I get an error: "Notice: Undefined index: rb_amntspent in...
    5. Gateway Down?
      Hi Is the gateway down or are the 4th July celebrations still going on? Haven't seen a post since 11th July. Cheers, -- Mark. ...
  3. #2

    Default Re: Net::Google 502 Bad gateway errors


    "Ben Bullock" <benkasminbullock@gmail.com> wrote in message
    news:e4ef2p$bnv$1@ml.accsnet.ne.jp...
    > Does anyone here use the Net::Google module? It seems to run very slowly,
    > and I keep getting "502 Bad gateway" errors. In the end I just downloaded
    > the search page using libwww and parsed it myself, which is almost
    > instant.
    Hi,
    I think the "Bad Gateway" stuff is actually a Google api/server problem. I
    had this and it was nothing to do with Net::Google or my query. (though you
    might have posted some code :)) - I assume you have a google api key, by
    the way. I looked at a google api newsgroup and this was a fairly regular
    problem

    Believe it or not the solution is probably: leave it a couple of minutes and
    try again a few times. It does work, but sometimes rather sporadically. I
    found the Yahoo api stuff much more reliable. have a look at that:
    [url]http://developer.yahoo.com/[/url]

    Others were having this problem in January and posted some code (though they
    were using SOAP::Lite, adjust your code accordingly):

    [url]http://groups.google.co.uk/group/google.public.web-apis/browse_frm/thread/6f1ef9463b961feb/091e5c9505d5f81a?lnk=st&q=google+api+502+bad+gatew ay&rnum=1&hl=en#091e5c9505d5f81a[/url]

    cheers
    Henry


    Henry McGuinness Guest

  4. #3

    Default Re: Net::Google 502 Bad gateway errors

    "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
    news:e4hbvp$le9$1@news.ox.ac.uk...
    >
    > "Ben Bullock" <benkasminbullock@gmail.com> wrote in message
    > news:e4ef2p$bnv$1@ml.accsnet.ne.jp...
    >> Does anyone here use the Net::Google module? It seems to run very slowly,
    >> and I keep getting "502 Bad gateway" errors. In the end I just downloaded
    >> the search page using libwww and parsed it myself, which is almost
    >> instant.
    > I think the "Bad Gateway" stuff is actually a Google api/server problem. I
    > had this and it was nothing to do with Net::Google or my query. (though
    > you might have posted some code :)) - I assume you have a google api key,
    > by the way. I looked at a google api newsgroup and this was a fairly
    > regular problem
    Yes, I've got one of those.
    > Believe it or not the solution is probably: leave it a couple of minutes
    > and try again a few times. It does work, but sometimes rather
    > sporadically. I found the Yahoo api stuff much more reliable. have a look
    > at that: [url]http://developer.yahoo.com/[/url]
    OK, but what about just putting a search URL together then grabbing the page
    via libwww and parsing it using regular expressions though? That works
    almost every time, I never get any 502 errors, and the results are virtually
    instant. I can't see why I would want to use this Net::Google thing in the
    first place.
    > Others were having this problem in January and posted some code (though
    > they were using SOAP::Lite, adjust your code accordingly):
    That is where the error comes in, it gives the line numbers from that code.
    I'm not sure I'd want to spend hours fixing it though, because I'm far from
    being an expert in Perl and it would take a lot of time for me to do so. I
    suppose the nature of my question was to try to find out why anyone would
    use Net::Google when it seems to endlessly choke and run very slowly, and
    it's easy to get the stuff from Google via another method.



    Ben Bullock Guest

  5. #4

    Default Re: Net::Google 502 Bad gateway errors

    "Ben Bullock" <benkasminbullock@gmail.com> wrote:
    > Does anyone here use the Net::Google module? It seems to run very
    > slowly, and I keep getting "502 Bad gateway" errors.
    Yes, blame it on Google. I read similar complaints in the python
    newsgroup, and I replied there with: just retry.

    Somehow the API is quite unstable on Google's side for at least the past
    two weeks. About 3 weeks ago I couldn't even access the wsdl file most of
    the times.


    --
    John Bokma Freelance software developer
    &
    Experienced Perl programmer: [url]http://castleamber.com/[/url]
    John Bokma Guest

  6. #5

    Default Re: Net::Google 502 Bad gateway errors

    "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote:
    > Others were having this problem in January and posted some code
    > (though they were using SOAP::Lite, adjust your code accordingly):
    Net::Google uses SOAP::Lite, so that's probably not changing a single
    thing :-)

    OTOH, I suspect that the latest Net::Google has some bugs regarding
    booleans, and hence some options are always on (or off, can't recall).

    I haven't had time to look into this further, but it you notice odd
    results, you might want to check what Net::Google is making SOAP::Lite do
    (IIRC there is a lot of hacking going in order to talk to SOAP::Lite)

    --
    John Bokma Freelance software developer
    &
    Experienced Perl programmer: [url]http://castleamber.com/[/url]
    John Bokma Guest

  7. #6

    Default Re: Net::Google 502 Bad gateway errors


    "Ben Bullock" <benkasminbullock@gmail.com> wrote in message
    news:e4jddl$h67$1@ml.accsnet.ne.jp...
    > "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
    > news:e4hbvp$le9$1@news.ox.ac.uk...
    >> Believe it or not the solution is probably: leave it a couple of minutes
    >> and try again a few times. It does work, but sometimes rather
    >> sporadically. I found the Yahoo api stuff much more reliable. have a look
    >> at that: [url]http://developer.yahoo.com/[/url]
    >
    > OK, but what about just putting a search URL together then grabbing the
    > page via libwww and parsing it using regular expressions though? That
    > works almost every time, I never get any 502 errors, and the results are
    > virtually instant. I can't see why I would want to use this Net::Google
    > thing in the first place.
    Maybe, but watch google's terms of service on this. They don't like
    "automated queries" and are not specific about all the types of query this
    includes: [url]http://www.google.co.uk/intl/en/terms_of_service.html[/url]
    >
    >> Others were having this problem in January and posted some code (though
    >> they were using SOAP::Lite, adjust your code accordingly):
    >
    > That is where the error comes in, it gives the line numbers from that
    > code.
    Yes. What I meant was you'll have to change their SOAP::Lite syntax to the
    Net::Google query you want to do so you'll have:

    ....do {

    #your Net::Google search here instead of the doGoogleSearch stuff...
    if ( $@ ) { ......




    cheers
    Henry


    Henry McGuinness Guest

  8. #7

    Default Re: Net::Google 502 Bad gateway errors

    "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
    news:e4k6m1$lcf$1@news.ox.ac.uk...
    >
    > "Ben Bullock" <benkasminbullock@gmail.com> wrote in message
    > news:e4jddl$h67$1@ml.accsnet.ne.jp...
    >> "Henry McGuinness" <henry.mcguinness@dphpc.ox.ac.uk> wrote in message
    >> news:e4hbvp$le9$1@news.ox.ac.uk...
    >
    >>> Believe it or not the solution is probably: leave it a couple of minutes
    >>> and try again a few times. It does work, but sometimes rather
    >>> sporadically. I found the Yahoo api stuff much more reliable. have a
    >>> look at that: [url]http://developer.yahoo.com/[/url]
    >>
    >> OK, but what about just putting a search URL together then grabbing the
    >> page via libwww and parsing it using regular expressions though? That
    >> works almost every time, I never get any 502 errors, and the results are
    >> virtually instant. I can't see why I would want to use this Net::Google
    >> thing in the first place.
    >
    > Maybe, but watch google's terms of service on this. They don't like
    > "automated queries" and are not specific about all the types of query this
    > includes: [url]http://www.google.co.uk/intl/en/terms_of_service.html[/url]
    I'm guessing that would be more directed at people like scroogle
    ([url]http://www.scroogle.org/[/url]) than someone like me, who's unlikely to download
    more than 100 pages a day.


    Ben Bullock Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139