HTTP Error 503. The service is unavailable



I woke up this morning to this error. I tried to bring up my homepage and got that 503 error. I double clicked on the index.html that displays my homepage and everything came up except the picture in the upper right hand corner of my homepage; it's a random image that is displayed from an asp page (inside of an iframe):

 

<!DOCTYPE html>
<html>
<body>
<%
Dim imgArr(), arrCntr, max, min
ReDim imgArr(176)

imgArr(0) = "SarahBakman.jpg"
imgArr(1) = "Chyna-WWE-4.jpg"
imgArr(2) = "chyna-630x370.jpg"
imgArr(3) = "chyna2.jpg"
.
.
.
imgArr(172) = "FerarriP4Valet.jpg"
imgArr(173) = "FerarriP4ShowRoom.jpg"
imgArr(174) = "ferrari-p4-5-by-pininfarina-cool-cars-carzz_348729_xl.jpg"
imgArr(175) = "911SpeedsterFront.jpg"
imgArr(176) = "911SpeedsterRear.jpg"
max = ubound(imgArr)
min = 0
Randomize
arrCntr = int((max + 1)*rnd)

response.write("<img src='http://community-info.org/DavePics/" + imgArr(arrCntr) + "' width='100%' + height='100%' alt='" + cStr(arrCntr) + "'>")
%>
</body>
</html> 

 

The code for my asp script is the same for a Perl script I used to use for this section of my homepage; modified. If I wrote this from scratch I would've done something like cd to my pictures folder and created a list of pictures by entering dir /b > pics.asp  Then I would've edited pics.asp;

 

<%

   Dim picsArr(), picsStr;

   picsStr = "the list of files I just got from the dir /b statement"

   picsArr = split(picsStr)
   .
   .
   .

%>

 

Then I would still use ubound to get the array size, etc. This is just a little aside about coding. It was easier for me to use the code I already had and use the column editing features of notepad++ (and replace/all) then to write some slick looking code from scratch.

 

My homepage displayed the same 503 code in the asp section. Naturally, I thought there was a problem with asp; there wasn't. I binged (this is an IIS issue, so binging makes more sense then googling) the 503 error and found this extremely helpful web page http://forums.iis.net/t/1183179.aspx?Service+Unavailable+HTTP+Error+503+The+service+is+unavailable+   The comment in this forum that was really helpful was:

 

 

So, I took a look at the log files and found this:

2015-08-09 12:23:27 73.49.60.32 37124 192.168.1.6 80 HTTP/1.1 GET /CitronGallery/AllPics.html 503 1 N/A DefaultAppPool
2015-08-09 12:23:27 73.49.60.32 37125 192.168.1.6 80 HTTP/1.1 GET /CitronGallery/AllPics.html 503 1 N/A DefaultAppPool
2015-08-09 12:23:27 73.49.60.32 37126 192.168.1.6 80 HTTP/1.1 GET /CitronGallery/AllPics.html 503 1 N/A DefaultAppPool
2015-08-09 12:23:27 73.49.60.32 37127 192.168.1.6 80 HTTP/1.1 GET /CitronGallery/AllPics.html 503 1 N/A DefaultAppPool
.
.
.

I crawl my own CitronGallery with a Perl script. I tried to look at my pictures of Citron by double clicking on AllPics.html, and all I got were a bunch of missing picture icons. According to my error logs the queue was full. Everybody who had posted on the aforementioned IIS forum said their problem was caused by an application pool problem.  So I went to the system services menu; start->computer-right click->manage->Services and Applications->Services->Standard  and then restarted all services that started with the string "application"; that worked!

 

 

What all this boils down to is, the fix for a 503 error is restarting your application services (I left out one step I tried; I checked the application pools in IIS  - didn't see any problems).  I thought my debugging steps might be enlightening for anybody having an HTTP Error 503.

Since I posted this blog/instructional I woke up again to the same 503 error. The first thing I tried last time was an iisreset and a restart from the IIS manager. That didn't work, which is why I had to go through all the gyrations I did. This last time I just did an iisreset and restarted the IIS server through the IIS manager; that did it this time! I should've mentioned at the start of my degugging diatribe that you check out the easy stuff first; it resolved the 503 error this time. BTW, I didn't wake up to a 503 error today.


Return To My Blog Page                                              Return To My Programming Page