Server returned HTTP response code: 503 for URL - Stack ...
文章推薦指數: 80 %
The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this ... Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore ServerreturnedHTTPresponsecode:503forURL AskQuestion Asked 7yearsago Modified 7yearsago Viewed 52ktimes 4 3 Getting"Exceptioninthread"main"java.io.IOException:ServerreturnedHTTPresponsecode:503forURL"errorwhenImakemultiplecallstoAmazonProductAdvertisingAPI. Isthereasonoverloadingoftheservice? OnePossiblesolutionistouseThread.Sleep(milliseconds)method. Butisthereanyothermoresophisticatedsolution?Likeproxiesorsomething? Hereisthecodeusedtomaketheconnection: URLamazon=newURL(url); URLConnectionyc=amazon.openConnection(); BufferedReaderin=newBufferedReader( newInputStreamReader( yc.getInputStream())); IamusingJava! javaapiurlhttp-status-code-503 Share Improvethisquestion Follow editedMay27,2015at20:48 DataMiningEnthusiast askedMay27,2015at20:19 DataMiningEnthusiastDataMiningEnthusiast 10122goldbadges22silverbadges1111bronzebadges 1 2 whathaveyoutried?doyouhaveanycode?Howarewesupposedtoknowwhatsgoingonwhenyou'vegivenusnothingbutanerrorcode? – BenGlasser May27,2015at20:25 Addacomment | 2Answers 2 Sortedby: Resettodefault Highestscore(default) Datemodified(newestfirst) Datecreated(oldestfirst) 3 Fromhttp://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html,whichdefinesthesestatuscodes: 10.5.4503ServiceUnavailable Theserveriscurrentlyunabletohandletherequestduetoatemporaryoverloadingormaintenanceoftheserver.Theimplicationisthatthisisatemporaryconditionwhichwillbealleviatedaftersomedelay.Ifknown,thelengthofthedelayMAYbeindicatedinaRetry-Afterheader.IfnoRetry-Afterisgiven,theclientSHOULDhandletheresponseasitwouldfora500response. Note:Theexistenceofthe503statuscodedoesnotimplythataservermustuseitwhenbecomingoverloaded.Someserversmaywishtosimplyrefusetheconnection. Soyes,serveroverloadisalikelycause.Tofigureouthowtodealwiththisyouprobablywanttodiscussitwithwhoeveroperatestheservice,tounderstandwhattheycantolerate.Then,ifyousearchfor"throttlewebrequests"onSO,you'llfindanumberofdiscussionsofhowtoimplementthrottlingonceyouknowyourrequirement. Edit NowthatIseeyou'retalkingaboutAmazonAdvertisingAPI,aquicksearchgotmetothispage:http://docs.aws.amazon.com/AWSECommerceService/latest/DG/TroubleshootingApplications.html TheEfficiencyGuidelinesonthatpageprettyclearlystatewhatwilltriggeryourproblem,andtherequestratesthatareacceptable. Share Improvethisanswer Follow editedMay27,2015at20:40 answeredMay27,2015at20:33 AndyLowryAndyLowry 77566silverbadges1212bronzebadges 2 Wow!Thanks,Idon'thowIskippedthatpartintheirdocumentation.IalreadyknewthattheAPIhasmaximumlimittoit,butdidn'treaditofficiallyanywhere.NowIhave. – DataMiningEnthusiast May27,2015at20:45 Hi,aftersettingtheThread.sleep()to3secondsalso,Iamgettingthesameerror.IamusingJsoup.connect(url).timeout(300*1000).get();togetthedatafromurl.Iusedtimeoutaswellandaftereverycalltourl,icallthread.sleep(3000).ThisistheerrorHTTPerrorfetchingURL.Status=503 – DataMiningEnthusiast Jun5,2015at0:16 Addacomment | 1 HTTP503meansRequestedServiceisUnavailable. Itmightbedueto, 1)Servermightbebusy 2)Servermightbedownformaintenance Ifyouareaccessingaserviceandgettingthiserror,thentrytocontacttheserviceownertofindoutwhat'sgoingon. Ifyouaretheowneroftheservice,thenchecktheerrorsinthelogtofindouttheproblem. Ifyouarejustmakinglot'sofconnectionstotheservicefromclientclass,andgettingthiserror,thenyouneedtothinkaboutwhyyouneedtocreatesomanyconnections. Share Improvethisanswer Follow answeredMay27,2015at20:27 K139K139 3,5441212silverbadges1717bronzebadges 3 Thankyou.IamusingAmazonProductAdvertisingAPI.SinceitsaserviceownedbyAmazontheydonotallowcontinuousaccessoftheservice.ImeanitworkswhenIgivesleeptimeoftwoseconds,butIwasthinkingisthereanotherwaysothatIdon'thavetowait2secondsaftereachAPIcall?TomaketheconnectionIamusingURLConnection.Ihaveaddedthecode. – DataMiningEnthusiast May27,2015at20:32 @DataMiningEnthusiastIftheAmazonenforcesthe2secondsrule,thenitisbettertoobeyit,andmakethecallafter2secondswithsleep. – K139 May27,2015at20:33 Okay.Theydidn'tmentionitparticularlythatithastobetwoseconds.ButItried1secondanditgaveerror.Itseemstobeworkingwith2secondsuntilnow.Thanksforthefrequentreply. – DataMiningEnthusiast May27,2015at20:41 Addacomment | YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedjavaapiurlhttp-status-code-503oraskyourownquestion. TheOverflowBlog Talkingblockchain,functionalprogramming,andthefuturewithTezos... Abeginner’sguidetoJSON,thedataformatfortheinternet FeaturedonMeta AnnouncingthearrivalofValuedAssociate#1214:Dalmarus Improvementstositestatusandincidentcommunication CollectivesUpdate:IntroducingBulletins RetiringOurCommunity-SpecificClosureReasonsforServerFaultandSuperUser The[social]tagisintheprocessofbeingburninated AskWizardTestResultsandNextSteps Linked 2 TexttoSpeechinJavausingGoogle Related 5350 HowtochangetheURI(URL)foraremoteGitrepository? 0 Errorisjava.io.IOException:ServerreturnedHTTPresponsecode:500forURL:whileinvokingweservice 1025 Can'tstartEclipse-Javawasstartedbutreturnedexitcode=13 1 java.io.IOException:ServerreturnedHTTPresponsecode:503forURL:Error 15 SOAPmessagetowebservice-HTTPresponsecode:403forURL 0 BestWayforhandlingHTTP503inpostrequest 0 HowcanIreadanhtmlcodefromAmazonbyusingURLoranyothermethod?503CodeAppears HotNetworkQuestions German€9ticketfortrains Doprofessorsinpuremathematicshirenon-PhDresearchassistant? Locatingitemsinspacedriftingtogether Howmanylightchangeswilla7-segmentdisplayneed? tcolorboxinsidetabularrayleadingto[0]s Butisitaprettyplace? Whatispart53119supposedtorepresent? WhatisGoogleupto?GooglePlayStoreupdatingappseventhoughauto-updateisdisabled HowcanIusemyGoogleAccountwithAppleapps(Mail,Calendar,etc)inOSX10.10andolder? Aresurrogatekeysaknownanti-pattern? f-stringrepresentationdifferentthanstr() (How)canapannierrackmountontheSpecializedDivergeEliteE5? Atwhatpointinhistorywastheideaofplanetsbeingspitoutbythesunabandoned? Atlas-Exportonlycertainpages Whatisa"sympatheticbit"? HowcanIdeterminewhymacOSreportsthatsystemdataincreasedbyover50Gbovernight? HighlightpolygonsusingcommadelimitedtextcoordinatesQGIS WhydoestheMySQLCHARdatatypehavenoprecedinglengthbyte? Bridgingonedeckjoistoveraformalpond HowcanImakeitsomytripod'scameraholderisn'tlooseandfloppy? Translatingprogramminglanguageterms:TalkingaboutpythonlibrariesshouldIreallytranslatethemas"Bibliotheken"? Isitpossibletokillamythicmonsterwithoutactivatingitsmythictrait? Statutoryrighttoreturnshoesboughtonlinethatdon'tfit DoIneedavisaforUKwhenmywifeisEUcitizenandIamnot? morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. lang-java Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings
延伸文章資訊
- 1503 Service Unavailable - HTTP - MDN Web Docs
超文本傳輸協定(英文:HyperText Transfer Protocol (HTTP) ) 503 Service Unavailable 表示目前伺服器暫時不能處理連線的請求。
- 2Server returned HTTP response code: 503 for URL
Error 503 means that the server is unreachable, but returned an error status code which is not re...
- 3Google Groups
This doesn't sounds like an issue connected with Cloud Debugger. Because, A 503 Service Unavailab...
- 4What is HTTP error 503 and how do you fix it? | IT PRO
- 5java.io.IOException: Server returned HTTP response code
ERROR: "java.io.IOException: Server returned HTTP response code: 503 for URL" while using Address...